#include <MathVector.h>
Public Types | |
| typedef Vector< T, NumberTraits > | vector_type |
| shortcut for the type of this class | |
| typedef T | number_type |
| type of the vector elements | |
| typedef NumberTraits | traits_type |
| the AlgebraicTraits class associated to the type of vector elements | |
| typedef NumberTraits::norm_type | norm_type |
| the type of the norm of the vector | |
Public Member Functions | |
| Vector () | |
| Vector (unsigned int nSize) | |
| ~Vector () | |
| Vector (const vector_type &other) | |
| vector_type & | operator= (const vector_type &other) |
| vector_type | operator- () const |
| vector_type | operator+ (const vector_type &rhs) const |
| vector_type | operator- (const vector_type &rhs) const |
| number_type | operator * (const vector_type &rhs) const |
| vector_type & | operator+= (const vector_type &rhs) |
| vector_type & | operator-= (const vector_type &rhs) |
| bool | operator== (const vector_type &rhs) const |
| bool | operator!= (const vector_type &rhs) const |
| bool | operator< (const vector_type &rhs) const |
| operator number_type * () const | |
| number_type | getNorm () |
| size_t | size () const |
| const vector_type | zero () const |
| void | display (std::ostream &os=std::cout) const |
| void | load (std::istream &is) |
| void | save (std::ostream &os) const |
Definition at line 26 of file MathVector.h.
| Vector< T, NumberTraits >::Vector | ( | ) | [inline] |
Default constructor
Definition at line 64 of file MathVector.h.
| Vector< T, NumberTraits >::Vector | ( | unsigned int | nSize | ) | [inline, explicit] |
Constructor
| nSize | initial count of elements in the vector |
Definition at line 71 of file MathVector.h.
| Vector< T, NumberTraits >::~Vector | ( | ) | [inline] |
Destructor
Definition at line 78 of file MathVector.h.
| Vector< T, NumberTraits >::Vector | ( | const vector_type & | other | ) | [inline] |
Copy constructor
Definition at line 85 of file MathVector.h.
References Vector< T, NumberTraits >::size().
Here is the call graph for this function:

| vector_type& Vector< T, NumberTraits >::operator= | ( | const vector_type & | other | ) | [inline] |
Assignment operator
Definition at line 95 of file MathVector.h.
References Vector< T, NumberTraits >::size().
Here is the call graph for this function:

| vector_type Vector< T, NumberTraits >::operator- | ( | ) | const [inline] |
Unary minus operator
Definition at line 123 of file MathVector.h.
| vector_type Vector< T, NumberTraits >::operator+ | ( | const vector_type & | rhs | ) | const [inline] |
Addition operator. This function simply sums up corresponding elements in vectors having the same size.
| rhs | right hand side vector |
Definition at line 141 of file MathVector.h.
References Vector< T, NumberTraits >::size().
Here is the call graph for this function:

| vector_type Vector< T, NumberTraits >::operator- | ( | const vector_type & | rhs | ) | const [inline] |
Subtraction operator. This function simply subtracts corresponding elements in vectors having the same size.
| rhs | right hand side vector |
Definition at line 168 of file MathVector.h.
References Vector< T, NumberTraits >::size().
Here is the call graph for this function:

| number_type Vector< T, NumberTraits >::operator * | ( | const vector_type & | rhs | ) | const [inline] |
Compute the scalar product of two same sizes vectors.
| rhs | right hand side vector |
Definition at line 195 of file MathVector.h.
References Vector< T, NumberTraits >::size().
Here is the call graph for this function:

| vector_type& Vector< T, NumberTraits >::operator+= | ( | const vector_type & | rhs | ) | [inline] |
Addition assignment operator
| rhs | right hand side vector |
Definition at line 223 of file MathVector.h.
References Vector< T, NumberTraits >::size().
Here is the call graph for this function:

| vector_type& Vector< T, NumberTraits >::operator-= | ( | const vector_type & | rhs | ) | [inline] |
Subtraction assignment operator
| rhs | Right hand side vector |
Definition at line 242 of file MathVector.h.
References Vector< T, NumberTraits >::size().
Here is the call graph for this function:

| bool Vector< T, NumberTraits >::operator== | ( | const vector_type & | rhs | ) | const [inline] |
Equality operator
| rhs | right hand side vector |
Definition at line 266 of file MathVector.h.
References Vector< T, NumberTraits >::size().
Here is the call graph for this function:

| bool Vector< T, NumberTraits >::operator!= | ( | const vector_type & | rhs | ) | const [inline] |
Inequality operator
| rhs | right hand side vector |
Definition at line 288 of file MathVector.h.
References Vector< T, NumberTraits >::size().
Here is the call graph for this function:

| bool Vector< T, NumberTraits >::operator< | ( | const vector_type & | rhs | ) | const [inline] |
Comparison operator.
| rhs | right hand side vector |
Definition at line 311 of file MathVector.h.
References Vector< T, NumberTraits >::getNorm().
Here is the call graph for this function:

| Vector< T, NumberTraits >::operator number_type * | ( | ) | const [inline] |
Cast operator to number_type. This operator is used to access the elements of the vector in the same way as accessing elements of a C array. (e.g. vect[0])
Definition at line 336 of file MathVector.h.
| number_type Vector< T, NumberTraits >::getNorm | ( | ) | [inline] |
Compute the euclidean norm of the vector.
Definition at line 344 of file MathVector.h.
Referenced by Vector< T, NumberTraits >::operator<().
Here is the caller graph for this function:

| size_t Vector< T, NumberTraits >::size | ( | ) | const [inline] |
Return the count of elements in the vector
Definition at line 362 of file MathVector.h.
Referenced by Vector< T, NumberTraits >::operator *(), Vector< T, NumberTraits >::operator!=(), Vector< T, NumberTraits >::operator+(), Vector< T, NumberTraits >::operator+=(), Vector< T, NumberTraits >::operator-(), Vector< T, NumberTraits >::operator-=(), Vector< T, NumberTraits >::operator=(), Vector< T, NumberTraits >::operator==(), and Vector< T, NumberTraits >::Vector().
Here is the caller graph for this function:

| const vector_type Vector< T, NumberTraits >::zero | ( | ) | const [inline] |
Synthetise a vector having all elements equal to zero. The synthetised vector has the same size as this vector. To call this method this vector can not be empty.
Definition at line 374 of file MathVector.h.
| void Vector< T, NumberTraits >::display | ( | std::ostream & | os = std::cout |
) | const [inline] |
Displays this vector to a stream.
| os | the stream to insert this vector into |
Definition at line 393 of file MathVector.h.
| void Vector< T, NumberTraits >::load | ( | std::istream & | is | ) | [inline] |
Load this from a stream
| is | stream to load from |
Definition at line 409 of file MathVector.h.
| void Vector< T, NumberTraits >::save | ( | std::ostream & | os | ) | const [inline] |