MaMiCo 1.2
|
#include <Vector.h>
Public Member Functions | |
Vector (const T &t) | |
init. vector with a scalar value. | |
Vector (const T &t0, const T &t1) | |
special constructor for 2D left empty for general purpose vector | |
Vector (const T &t0, const T &t1, const T &t2) | |
special constructor for 3D; left empty for general purpose vector | |
Vector (const Vector< size, T > &v) | |
constructor init. vector from vector | |
void | assign (const T &t) |
assigns a value to all vector entries. | |
Vector< size, T > & | operator= (const Vector< size, T > &v) |
operator overloading for vector assignment | |
T & | operator[] (int i) |
operator overloading; access to vector entries; both () and [] are allowed | |
const T & | operator[] (int i) const |
operator overloading; access to vector entries; both () and [] are allowed; !!! Attention: const | |
Vector< size, T > & | operator+= (const Vector< size, T > &v) |
operator overloading; add a vector to this existing one (this) | |
Vector< size, T > & | operator-= (const Vector< size, T > &v) |
operator overloading; subtracts a vector from the existing one (this) | |
template<class convert_to_T> | |
operator Vector< size, convert_to_T > () const | |
Private Attributes | |
T | _entries [size] |
light-weight implementation of a vector class.
size | Size |
T | Data type |
|
inline |
init. vector with a scalar value.
t | scalar value for the initialization |
|
inline |
special constructor for 2D left empty for general purpose vector
t0 | scalar value for the initialization |
t1 | scalar value for the initialization |
|
inline |
special constructor for 3D; left empty for general purpose vector
t0 | scalar value for the initialization |
t1 | scalar value for the initialization |
t2 | scalar value for the initialization |
|
inline |
constructor init. vector from vector
v | Vector for the initialization |
|
inline |
assigns a value to all vector entries.
t | scalar value for the assignment |
|
inlineexplicit |
cast Vector<size, T> to Vector<size, convert_to_T>
|
inline |
operator overloading; add a vector to this existing one (this)
v | vector that has to be added |
|
inline |
operator overloading; subtracts a vector from the existing one (this)
v | vector that has to be subtracted |
|
inline |
operator overloading for vector assignment
v | Vector for the assignment |
|
inline |
operator overloading; access to vector entries; both () and [] are allowed
i | index |
|
inline |
operator overloading; access to vector entries; both () and [] are allowed; !!! Attention: const
i | index |