vector with integer components More...
#include <TinyVector.hxx>
Public Types | |
typedef int | value_type |
Public Member Functions | |
TinyVector () | |
All components are set to 0. | |
TinyVector (const int &a) | |
Sets the first component of the vector. | |
TinyVector (const int &a, const int &b) | |
Sets the two first components of the vector. | |
TinyVector (const int &a, const int &b, const int &c) | |
Sets the three first components of the vector. | |
TinyVector (const int &a, const int &b, const int &c, const int &d) | |
Sets the fourth first components of the vector. | |
TinyVector (const int &a, const int &b, const int &c, const int &d, const int &e) | |
Sets the first five components of the vector. | |
void | Init (const int &a) |
sets first component to a | |
void | Init (const int &a, const int &b) |
sets two first components of the vector | |
void | Init (const int &a, const int &b, const int &c) |
sets three first components of the vector | |
void | Init (const int &a, const int &b, const int &c, const int &d) |
sets four first components of the vector | |
void | Init (const int &a, const int &b, const int &c, const int &d, const int &e) |
sets five first components of the vector | |
int | GetM () const |
Returns the number of stored elements. | |
int | GetLength () const |
Returns the number of stored elements. | |
int | GetSize () const |
Returns the number of stored elements. | |
size_t | GetMemorySize () const |
returns the size used by the object in bytes | |
TinyVector< int, m_ > & | GetLeafClass () |
returns leaf class | |
const TinyVector< int, m_ > & | GetLeafClass () const |
const int & | operator() (int i) const |
returns x(i) | |
int & | operator() (int i) |
returns x(i) | |
void | Print () const |
displays the vector without brackets | |
void | Print (ostream &) const |
displays the vector without brackets | |
void | Zero () |
Sets all components to 0. | |
void | Fill () |
Sets the vector to [0, 1, 2, 3, ..., n-1]. | |
void | Fill (const T0 &x) |
Sets all components to a given value. | |
void | FillRand () |
sets randomly the components with function rand() | |
bool | IsZero () const |
returns true if all components are 0 | |
ClassComplexType< int >::Treal | DistanceSquare (const TinyVector< int, m_ > &p) const |
returns |u-v|^2 (usual euclidian norm) | |
ClassComplexType< int >::Treal | Distance (const TinyVector< int, m_ > &p) const |
returns |u-v| (usual euclidian norm) | |
operator TinyVector< int, m_ > & () | |
operator TinyVector< int, m_ > const & () const | |
Protected Attributes | |
int | data_ [m_] |
vector with integer components
Definition at line 125 of file TinyVector.hxx.