This class pretty much duplicates std::valarray<T> except it's fully STL container compliant. Remember that operators +=, -=, *= and /= are provided by RefVectorBase.
Definition at line 67 of file Vector.hpp.
#include <Vector.hpp>

Public Types | |
| typedef T * | iterator |
| STL iterator type. More... | |
| typedef T & | reference |
| STL reference type. More... | |
| typedef T | value_type |
| STL value type. More... | |
Public Member Functions | |
| iterator | begin () |
| STL iterator begin. More... | |
| const_iterator | begin () const |
| STL const iterator begin. More... | |
| bool | empty () const |
| STL empty. More... | |
| iterator | end () |
| STL iterator end. More... | |
| const_iterator | end () const |
| STL const iterator end. More... | |
| value_type | front () |
| STL front. More... | |
| const_reference | front () const |
| STL const front. More... | |
| size_t | max_size () const |
| STL max_size. More... | |
| Vector | operator&& (const T &b) |
| Returns the concatenation of this Vector and a scalar of type T. More... | |
| Vector | operator&& (const Vector &b) |
| Returns the concatenation of this Vector and Vector b. More... | |
| T & | operator() (size_t i) |
| Non-const operator () More... | |
| T | operator() (size_t i) const |
| Const operator () More... | |
| Vector & | operator<< (const T &b) |
| Returns the concatenation of this Vector and a scalar of type T. More... | |
| Vector & | operator<< (const Vector &b) |
| template<class E > | |
| Vector & | operator= (const ConstVectorBase< T, E > &x) |
| *this will be resized if it isn't as large as x. More... | |
| Vector & | operator= (const std::valarray< T > &x) |
| *this will be resized if it isn't as large as x. More... | |
| Vector & | operator= (const std::vector< T > &x) |
| *this will be cleared and resized as necessary More... | |
| Vector & | operator= (const T *x) |
| Only (*this).size() elements will be assigned. More... | |
| Vector & | operator= (const T x) |
| Only (*this).size() elements will be assigned. More... | |
| Vector & | operator= (const Vector &x) |
| *this will be resized if it isn't as large as x. More... | |
| VectorSlice< T > | operator[] (const std::slice &sli) |
| Like valarray, lets you do vec[slice] to get a VectorSlice. More... | |
| T & | operator[] (size_t i) |
| Non-const operator []. More... | |
| T | operator[] (size_t i) const |
| Const operator []. More... | |
| Vector & | resize (const size_t index) |
| Vector & | resize (const size_t index, const T defaultValue) |
| resize with new default value More... | |
| size_t | size () const |
| STL size. More... | |
| std::vector< T > | toStdVector () |
| Vector () | |
| Default constructor. More... | |
| template<class E > | |
| Vector (const ConstVectorBase< T, E > &r) | |
| template<class E > | |
| Vector (const ConstVectorBase< T, E > &vec, size_t top, size_t num) | |
| subvector constructor More... | |
| Vector (const std::valarray< T > &r) | |
| Vector (const Vector &r) | |
| Vector (size_t siz) | |
| Constructor given an initial size. More... | |
| Vector (size_t siz, const T defaultValue) | |
| ~Vector () | |
| Destructor. More... | |
Public Member Functions inherited from gnsstk::RefVectorBase< T, Vector< T > > | |
| T & | operator() (size_t i) |
| returns a modifiable version of the element at index i. More... | |
| const Vector< T > | operator- () const |
| unary minus: multiplies each element in this matrix by -1. More... | |
| T & | operator[] (size_t i) |
| returns a modifiable version of the element at index i. More... | |
| RefVectorBase () | |
| constructor More... | |
| VecBaseNewAssignOperator (assignFrom,=) | |
| VecBaseNewAssignOperator (operator*=, *=) | |
| VecBaseNewAssignOperator (operator+=,+=) | |
| VecBaseNewAssignOperator (operator-=, -=) | |
| VecBaseNewAssignOperator (operator/=,/=) | |
| Vector< T > & | zeroize () |
Public Member Functions inherited from gnsstk::ConstVectorBase< T, Vector< T > > | |
| ConstVectorBase () | |
| Constructor. More... | |
| T | operator() (size_t i) const |
| returns the element at index i More... | |
| T | operator[] (size_t i) const |
| returns the element at index i More... | |
| size_t | size () const |
| Returns the size of the base class. More... | |
Public Attributes | |
| const typedef T * | const_iterator |
| STL const iterator type. More... | |
| const typedef T & | const_reference |
| STL const reference type. More... | |
Private Member Functions | |
| bool | rangeCheck (const size_t index) const |
Private Attributes | |
| size_t | s |
| The size of the vector. More... | |
| T * | v |
| The vector. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from gnsstk::RefVectorBaseHelper | |
| static GNSSTK_EXPORT double | zeroTolerance = 10e-10 |
Protected Member Functions inherited from gnsstk::RefVectorBase< T, Vector< T > > | |
| T & | vecRef (size_t i) |
Protected Member Functions inherited from gnsstk::ConstVectorBase< T, Vector< T > > | |
| T | constVectorRef (size_t i) const |
| typedef T* gnsstk::Vector< T >::iterator |
STL iterator type.
Definition at line 77 of file Vector.hpp.
| typedef T& gnsstk::Vector< T >::reference |
STL reference type.
Definition at line 73 of file Vector.hpp.
| typedef T gnsstk::Vector< T >::value_type |
STL value type.
Definition at line 71 of file Vector.hpp.
|
inline |
Default constructor.
Definition at line 82 of file Vector.hpp.
|
inline |
Constructor given an initial size.
Definition at line 85 of file Vector.hpp.
|
inline |
Constructor given an initial size and default value for all elements.
Definition at line 100 of file Vector.hpp.
|
inline |
Copy constructor from a ConstVectorBase type.
Definition at line 116 of file Vector.hpp.
|
inline |
Copy constructor.
Definition at line 131 of file Vector.hpp.
|
inline |
Valarray constructor
Definition at line 146 of file Vector.hpp.
|
inline |
subvector constructor
Definition at line 161 of file Vector.hpp.
|
inline |
Destructor.
Definition at line 187 of file Vector.hpp.
|
inline |
STL iterator begin.
Definition at line 193 of file Vector.hpp.
|
inline |
STL const iterator begin.
Definition at line 195 of file Vector.hpp.
|
inline |
STL empty.
Definition at line 205 of file Vector.hpp.
|
inline |
STL iterator end.
Definition at line 197 of file Vector.hpp.
|
inline |
STL const iterator end.
Definition at line 199 of file Vector.hpp.
|
inline |
STL front.
Definition at line 201 of file Vector.hpp.
|
inline |
STL const front.
Definition at line 203 of file Vector.hpp.
|
inline |
STL max_size.
Definition at line 209 of file Vector.hpp.
|
inline |
Returns the concatenation of this Vector and a scalar of type T.
Definition at line 340 of file Vector.hpp.
|
inline |
Returns the concatenation of this Vector and Vector b.
Definition at line 322 of file Vector.hpp.
|
inline |
Non-const operator ()
Definition at line 218 of file Vector.hpp.
|
inline |
Const operator ()
Definition at line 221 of file Vector.hpp.
|
inline |
Returns the concatenation of this Vector and a scalar of type T.
Definition at line 316 of file Vector.hpp.
|
inline |
Definition at line 296 of file Vector.hpp.
|
inline |
*this will be resized if it isn't as large as x.
Definition at line 234 of file Vector.hpp.
|
inline |
*this will be resized if it isn't as large as x.
Definition at line 238 of file Vector.hpp.
|
inline |
*this will be cleared and resized as necessary
Definition at line 248 of file Vector.hpp.
|
inline |
Only (*this).size() elements will be assigned.
Definition at line 244 of file Vector.hpp.
|
inline |
Only (*this).size() elements will be assigned.
Definition at line 241 of file Vector.hpp.
|
inline |
*this will be resized if it isn't as large as x.
Definition at line 229 of file Vector.hpp.
|
inline |
Like valarray, lets you do vec[slice] to get a VectorSlice.
Definition at line 225 of file Vector.hpp.
|
inline |
Non-const operator [].
Definition at line 212 of file Vector.hpp.
|
inline |
Const operator [].
Definition at line 215 of file Vector.hpp.
|
inlineprivate |
Definition at line 360 of file Vector.hpp.
|
inline |
Resizes the vector. if index > size, the vector will be erased and the contents destroyed.
Definition at line 262 of file Vector.hpp.
|
inline |
resize with new default value
Definition at line 279 of file Vector.hpp.
|
inline |
STL size.
Definition at line 207 of file Vector.hpp.
|
inline |
Definition at line 288 of file Vector.hpp.
| const typedef T* gnsstk::Vector< T >::const_iterator |
STL const iterator type.
Definition at line 79 of file Vector.hpp.
| const typedef T& gnsstk::Vector< T >::const_reference |
STL const reference type.
Definition at line 75 of file Vector.hpp.
|
private |
The size of the vector.
Definition at line 372 of file Vector.hpp.
|
private |
The vector.
Definition at line 370 of file Vector.hpp.