VISH  0.2
Classes | Public Types | Public Member Functions | Friends
Eagle::Vector Class Reference

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>

List of all members.

Classes

Public Types

Public Member Functions

Friends


Detailed Description

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.

Note:
The same cautions as when using FixedArray's apply, i.e. copying of objects of class Vector should be avoided because it will require to copy all elements.
Parameters:
NThe dimensionality of the vector, i.e. the number of elements.
TThe type of the elements which construct the vector.
Examples:

WebVish.cpp.


Constructor & Destructor Documentation

template<typename Indicable >
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() );
template<class AType , class ScalarType , int CompType>
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.

Note:
The operator argument is the second argument here, not the last because when giving it as last it would lead to ambiguities with the alternative computational constructors
template<class AType , class ScalarType , int CompType>
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.

Note:
The operator argument is the first argument here, not the last because when giving it as last it would lead to ambiguities with the alternative computational constructors

Member Function Documentation

template<class scalar >
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;

The documentation for this class was generated from the following file: