Public Member Functions
fmatvec::Vector< Fixed< M >, AT > Class Template Reference

This is a vector class of general shape in dense storage format. More...

#include <fixed_vector.h>

Inheritance diagram for fmatvec::Vector< Fixed< M >, AT >:
fmatvec::Matrix< General, Fixed< M >, Fixed< 1 >, AT >

List of all members.

Public Member Functions

 Vector (Noinit ini)
 Vector (Init ini=INIT, const AT &a=0)
 Vector (int m, Noinit ini)
 Vector (int m, Init ini=INIT, const AT &a=0)
 Vector (const char *str)
 String Constructor.
template<class Row >
 Vector (const Vector< Row, AT > &x)
 Copy Constructor.
template<class Type , class Row , class Col >
 Vector (const Matrix< Type, Row, Col, AT > &A)
 Copy Constructor.
template<class Row >
Vector< Fixed< M >, AT > & operator= (const Vector< Row, AT > &x)
AT & operator() (int i)
 Element operator.
const AT & operator() (int i) const
 Element operator.
AT & e (int i)
const AT & e (int i) const
 Element operator.
Vector< Fixed< M >, AT > & init (const AT &a=0)
 Initialization.
Vector< Fixed< M >, AT > & init (Init, const AT &a=0)
Vector< Fixed< M >, AT > & init (Noinit, const AT &a=0)
int size () const
 Size.
int inc () const
 Increment.
template<int M1, int M2>
const Vector< Fixed< M2-M1+1 >
, AT > 
operator() (const Range< Fixed< M1 >, Fixed< M2 > > &I) const
 operator std::vector< AT > ()
 Cast to std::vector<AT>.
 Vector (std::vector< AT > v)
 std::vector<AT> Constructor. Constructs and initializes a vector with a std::vector<AT> object.
const RowVector< Fixed< M >, AT > T () const
 return the transpose of the Vector, i.e. a RowVector
template<class Type , class Row , class Col >
void set (const Range< Var, Var > &I, const Matrix< Type, Row, Col, AT > &A)
 set a subvector - specified by the range - to the given vector

Detailed Description

template<int M, class AT>
class fmatvec::Vector< Fixed< M >, AT >

This is a vector class of general shape in dense storage format.

Template class Vector of type General, id. shape is general and storage form is dense. The template parameter AT defines the atomic type of the vector. Valid types are int, float, double, complex<float> and complex<double>


Constructor & Destructor Documentation

template<int M, class AT >
fmatvec::Vector< Fixed< M >, AT >::Vector ( const char *  str) [inline]

String Constructor.

Constructs and initializes a vector with a string in a matlab-like notation. The entries are seperated by semicolons. For example

 Vector<double> x("[3;1;2]");

constructs the vector

\[ x=\begin{pmatrix}3\\ 1 \\ 2\end{pmatrix} \]

Parameters:
strThe string the vector will be initialized with.
template<int M, class AT >
template<class Row >
fmatvec::Vector< Fixed< M >, AT >::Vector ( const Vector< Row, AT > &  x) [inline]

Copy Constructor.

Constructs a reference to the vector x.

Attention:
The physical memory of the vector x will not be copied, only referenced.
Parameters:
xThe vector that will be referenced.
template<int M, class AT >
template<class Type , class Row , class Col >
fmatvec::Vector< Fixed< M >, AT >::Vector ( const Matrix< Type, Row, Col, AT > &  A) [inline, explicit]

Copy Constructor.

See Vector(const Vector<General, AT>&)

template<int M, class AT >
fmatvec::Vector< Fixed< M >, AT >::Vector ( std::vector< AT >  v) [inline]

std::vector<AT> Constructor. Constructs and initializes a vector with a std::vector<AT> object.

Parameters:
vThe std::vector<AT> the vector will be initialized with.

Member Function Documentation

template<int M, class AT >
const AT& fmatvec::Vector< Fixed< M >, AT >::e ( int  i) const [inline]

Element operator.

See e(int)

template<int M, class AT >
int fmatvec::Vector< Fixed< M >, AT >::inc ( ) const [inline]

Increment.

Todo:
Docu
Returns:
The increment.
template<int M, class AT >
Vector< Fixed< M >, AT > & fmatvec::Vector< Fixed< M >, AT >::init ( const AT &  a = 0) [inline]

Initialization.

Initializes all elements of the calling vector with the value given by a.

Parameters:
aValue all elements will be initialized with.
Returns:
A reference to the calling vector.
template<int M, class AT >
fmatvec::Vector< Fixed< M >, AT >::operator std::vector< AT > ( ) [inline]

Cast to std::vector<AT>.

Returns:
The std::vector<AT> representation of the vector
template<int M, class AT >
AT& fmatvec::Vector< Fixed< M >, AT >::operator() ( int  i) [inline]

Element operator.

Returns a reference to the i-th element.

Parameters:
iThe i-th element.
Returns:
A reference to the element x(i).
Remarks:
The bounds are checked by default. To change this behavior, define FMATVEC_NO_BOUNDS_CHECK.
See also:
operator()(int) const
template<int M, class AT >
const AT& fmatvec::Vector< Fixed< M >, AT >::operator() ( int  i) const [inline]

Element operator.

See operator()(int)

template<int M, class AT >
int fmatvec::Vector< Fixed< M >, AT >::size ( ) const [inline]

Size.

Returns:
The size of the vector.

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