VISH
0.2
|
A Vector is an fixed-size array (see class FixedArray) with vector space operations, i.e. More...
#include </home/werner/origo/vish/ocean/eagle/Vector.hpp>
A Vector is an fixed-size array (see class FixedArray) with vector space operations, i.e.
addition, subtraction and scalar multiplication. The class name Vector denotes any elements of a vector space and its functionality is not limited to vectors in the narrower meaning within differential geometry. As such, a Matrix or tensor of higher rank is derived from a Vector as well and inherits all vector space operations as provided by the Vector base class.
Various computational constructors are supported, which make use of the Operator<> template trait class.
N | The dimensionality of the vector, i.e. the number of elements. |
T | The type of the elements which construct the vector. |
Eagle::Vector::Vector | ( | const Indicable & | I, |
const AnyType & | |||
) | [inline] |
Construct from indicable object, i.e.
anything which can be indiced with an integer. Example are native arrays or Vector types instantiations on other numerical types.
double values[5];
Vector<4, double> V( values, AnyType() );
Eagle::Vector::Vector | ( | const FixedArray< AType, n > & | l, |
const Operator< CompType > & | , | ||
const ScalarType & | scalar | ||
) | [inline] |
Computational constructor from vector with scalar, calls the Operator's ternary() member function for each element and the scalar as its 3rd argument.
Eagle::Vector::Vector | ( | const Operator< CompType > & | , |
const ScalarType & | scalar, | ||
const FixedArray< AType, n > & | v | ||
) | [inline] |
Computational constructor from scalar with vector calls the Operator's ternary() member function for each element and the scalar as its 2nd argument.
Assignment<Vector, 0> Eagle::Vector::operator= | ( | const scalar & | x | ) | [inline] |
Assign first element with scalar and use consecutive comma expressions for assignment of further elements As such a Vector may be assigned as.
Vector<4, double> V; V = 1.1, 2.2, 3.3, 4.4;