VectorSlice Class Template Reference
[Vector and Matrix mathematics]

#include <Vector.hpp>

Inheritance diagram for VectorSlice:

Inheritance graph
[legend]
Collaboration diagram for VectorSlice:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T>
class gpstk::VectorSlice< T >

A slice of Vector<T> that can be modified.

Warning:
Remember that (VectorSlice = VectorSlice) will assign elements to the VectorSlice, not copy the VectorSlice internal data!

Definition at line 330 of file Vector.hpp.

Public Member Functions

 VectorSlice ()
 Default constructor.
 VectorSlice (Vector< T > &vv)
 Makes a slice of the whole vector.
 VectorSlice (Vector< T > &vv, const std::slice &ss)
 Makes a slice of the vector with the given std::slice.
template<class V>
VectorSliceoperator= (const ConstVectorBase< T, V > &x)
 Assign the elements of this slice from another vector.
VectorSliceoperator= (const std::valarray< T > &x)
 Assign the elements of this slice from a valarray.
VectorSliceoperator= (const T x)
 Assign all the elements of this slice to x.
VectorSliceoperator= (const T *x)
 Assign (*this).size() elements from x to (*this).
T & operator[] (size_t i)
 Returns the modifiable i'th element of the slice.
operator[] (size_t i) const
 Returns the const i'th element of the slice.
T & operator() (size_t i)
 Returns the modifiable i'th element of the slice.
operator() (size_t i) const
 Returns the const i'th element of the slice.
size_t size () const
 returns the number of elements in the slice
size_t start () const
 returns the index in the vector of the first element.
size_t stride () const
 returns the number of elements to skip between (*this)[i] and (*this)[i+1]


Constructor & Destructor Documentation

VectorSlice  )  [inline]
 

Default constructor.

Definition at line 334 of file Vector.hpp.

VectorSlice Vector< T > &  vv  )  [inline]
 

Makes a slice of the whole vector.

Definition at line 339 of file Vector.hpp.

VectorSlice Vector< T > &  vv,
const std::slice &  ss
[inline]
 

Makes a slice of the vector with the given std::slice.

Definition at line 344 of file Vector.hpp.

References Vector::size().


Member Function Documentation

T operator() size_t  i  )  const [inline]
 

Returns the const i'th element of the slice.

Reimplemented from ConstVectorBase< T, VectorSlice< T > >.

Definition at line 375 of file Vector.hpp.

T& operator() size_t  i  )  [inline]
 

Returns the modifiable i'th element of the slice.

Reimplemented from RefVectorBase< T, VectorSlice< T > >.

Definition at line 372 of file Vector.hpp.

VectorSlice& operator= const T *  x  )  [inline]
 

Assign (*this).size() elements from x to (*this).

Definition at line 362 of file Vector.hpp.

VectorSlice& operator= const T  x  )  [inline]
 

Assign all the elements of this slice to x.

Definition at line 358 of file Vector.hpp.

VectorSlice& operator= const std::valarray< T > &  x  )  [inline]
 

Assign the elements of this slice from a valarray.

Definition at line 354 of file Vector.hpp.

VectorSlice& operator= const ConstVectorBase< T, V > &  x  )  [inline]
 

Assign the elements of this slice from another vector.

Definition at line 350 of file Vector.hpp.

T operator[] size_t  i  )  const [inline]
 

Returns the const i'th element of the slice.

Reimplemented from ConstVectorBase< T, VectorSlice< T > >.

Definition at line 369 of file Vector.hpp.

T& operator[] size_t  i  )  [inline]
 

Returns the modifiable i'th element of the slice.

Reimplemented from RefVectorBase< T, VectorSlice< T > >.

Definition at line 366 of file Vector.hpp.

size_t size void   )  const [inline]
 

returns the number of elements in the slice

Reimplemented from VectorSliceBase< VectorSlice< T > >.

Definition at line 379 of file Vector.hpp.

References Vector::size().

size_t start  )  const [inline]
 

returns the index in the vector of the first element.

Reimplemented from VectorSliceBase< VectorSlice< T > >.

Definition at line 381 of file Vector.hpp.

size_t stride  )  const [inline]
 

returns the number of elements to skip between (*this)[i] and (*this)[i+1]

Reimplemented from VectorSliceBase< VectorSlice< T > >.

Definition at line 384 of file Vector.hpp.


The documentation for this class was generated from the following file:
Generated on Wed Feb 8 03:31:43 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1