Public Member Functions
fmatvec::RowVector< AT > Class Template Reference

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

#include <row_vector.h>

Inheritance diagram for fmatvec::RowVector< AT >:
fmatvec::Matrix< General, AT >

List of all members.

Public Member Functions

 RowVector ()
 Standard constructor.
 RowVector (const char *str)
 String Constructor.
 RowVector (int n)
 Regular Constructor.
 RowVector (int n, AT *ele)
 Regular Constructor.
 RowVector (int n, Initialization ini, const AT &a=0)
 Regular Constructor.
 RowVector (const Matrix< General, AT > &x)
 Copy Constructor.
RowVector & resize (int n)
 Rowvector resizing.
RowVector & resize (int n, Initialization ini, const AT &a=0)
 Rowvector resizing.
 RowVector (const RowVector< AT > &x)
 Copy Constructor.
RowVector< AT > & operator<< (const RowVector< AT > &x)
 Copy operator.
RowVector< AT > & operator>> (const RowVector< AT > &x)
 Reference operator.
RowVector< AT > & operator= (const RowVector< AT > &x)
 Assignment operator.
AT & operator() (int i)
 Element operator.
const AT & operator() (int i) const
 Element operator.
RowVector< AT > & init (const AT &a)
 Initialization.
int size () const
 Size.
int inc () const
 Increment.
RowVector< AT > copy () const
 Rowvector duplicating.
RowVector< AT > operator() (int i1, int i2)
 Subrowvector operator.
const RowVector< AT > operator() (int i1, int i2) const
 Subvector operator.
RowVector< AT > operator() (const Index &I)
 Subrowvector operator.
const RowVector< AT > operator() (const Index &I) const
 Subrowvector operator.
Vector< AT > T ()
const Vector< AT > T () const
- Public Member Functions inherited from fmatvec::Matrix< General, AT >
 Matrix ()
 Standard constructor.
 Matrix (int m_, int n_)
 Regular Constructor.
 Matrix (int m_, int n_, Initialization ini, const AT &a=0)
 Regular Constructor.
 Matrix (const Matrix< General, AT > &A)
 Copy Constructor.
 Matrix (int m_, int n_, AT *ele_)
 Regular Constructor.
 Matrix (const char *str)
 String Constructor.
 ~Matrix ()
 Destructor.
Matrix< General, AT > & resize (int m_, int n_)
 Matrix resizing.
Matrix< General, AT > & resize (int m_, int n_, Initialization ini, const AT &a=0)
 Matrix resizing.
Matrix< General, AT > & operator= (const Matrix< General, AT > &A)
 Assignment operator.
template<class T >
Matrix< General, AT > & operator<< (const Matrix< T, AT > &A)
 Copy operator.
Matrix< General, AT > & operator>> (const Matrix< General, AT > &A)
 Reference operator.
AT * operator() ()
 Pointer operator.
const AT * operator() () const
 Pointer operator.
int rows () const
 Number of rows.
int cols () const
 Number of columns.
int ldim () const
 Leading dimension.
bool transposed () const
 Transposed status.
const CBLAS_TRANSPOSE blasTrans () const
 Transposed status.
const CBLAS_ORDER blasOrder () const
 Storage convention.
Matrix< General, AT > operator() (int i1, int j1, int i2, int j2)
 Submatrix operator.
const Matrix< General, AT > operator() (int i1, int j1, int i2, int j2) const
 Submatrix operator.
Matrix< General, AT > operator() (const Index &I, const Index &J)
 Submatrix operator.
const Matrix< General, AT > operator() (const Index &I, const Index &J) const
 Submatrix operator.
Vector< AT > col (int i)
 Column operator.
const Vector< AT > col (int i) const
 Column operator.
RowVector< AT > row (int i)
 Row operator.
const RowVector< AT > row (int i) const
 Row operator.
Matrix< General, AT > & resize ()
 Matrix unsizing.
 operator std::vector< std::vector< AT > > ()
 Cast to std::vector<std::vector<AT> >.
 Matrix (std::vector< std::vector< AT > > m)
 std::vector<std::vector<AT> > Constructor. Constructs and initializes a matrix with a std::vector<std::vector<AT> > object. An assert checks for constant length of each row.
template<class Type >
Matrix< General, AT > & operator<< (const Matrix< Type, AT > &A)

Detailed Description

template<class AT>
class fmatvec::RowVector< AT >

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

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


Constructor & Destructor Documentation

template<class AT>
fmatvec::RowVector< AT >::RowVector ( )
inline

Standard constructor.

Constructs a rowvector with no size.

template<class AT>
fmatvec::RowVector< AT >::RowVector ( 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
    @code 
    RowVector<double> x("[3,1,2]");
    \endcode
    constructs the vector

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

Parameters:
strThe string the vector will be initialized with.
template<class AT>
fmatvec::RowVector< AT >::RowVector ( int  n)
inline

Regular Constructor.

Constructs a rowvector of size n.

Parameters:
nThe size.
Remarks:
The rowvector will be initialised to zero by default. This default behavior can be changed by defining FMATVEC_NO_INITIALIZATION.
template<class AT>
fmatvec::RowVector< AT >::RowVector ( int  n,
AT *  ele 
)
inline

Regular Constructor.

Constructs a rowvector of size m with the pyhsical memory given by ele_;

Parameters:
nThe size.
eleThe physical memory the rowvector will point to.
template<class AT>
fmatvec::RowVector< AT >::RowVector ( int  n,
Initialization  ini,
const AT &  a = 0 
)
inline

Regular Constructor.

Constructs a vector of size n. The rowvector will be initialized to the value given by a (default 0), if ini is set to INIT. If init is set to NONINIT, the rowvector will not be initialized.

Parameters:
nThe size.
iniINIT means initialization, NONINIT means no initialization.
aThe value, the rowvector will be initialized with (default 0)
template<class AT>
fmatvec::RowVector< AT >::RowVector ( const Matrix< General, AT > &  x)
inlineexplicit
template<class AT>
fmatvec::RowVector< AT >::RowVector ( const RowVector< AT > &  x)
inline

Copy Constructor.

Constructs a reference to the rowvector x.

Attention:
The physical memory of the rowvector x will not be copied, only referenced.
Parameters:
xThe rowvector that will be referenced.

Member Function Documentation

template<class AT >
RowVector< AT > fmatvec::RowVector< AT >::copy ( ) const

Rowvector duplicating.

The calling rowvector returns a deep copy of itself.

Returns:
The duplicate of the calling rowvector.

Reimplemented from fmatvec::Matrix< General, AT >.

template<class AT>
int fmatvec::RowVector< AT >::inc ( ) const
inline

Increment.

Todo:
Docu
Returns:
The increment.
template<class AT >
RowVector< AT > & fmatvec::RowVector< AT >::init ( const AT &  a)

Initialization.

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

Parameters:
aValue all elements will be initialized with.
Returns:
A reference to the calling rowvector.

Reimplemented from fmatvec::Matrix< General, AT >.

template<class AT>
AT& fmatvec::RowVector< 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<class AT>
const AT& fmatvec::RowVector< AT >::operator() ( int  i) const
inline

Element operator.

See operator()(int)

template<class AT >
RowVector< AT > fmatvec::RowVector< AT >::operator() ( int  i1,
int  i2 
)

Subrowvector operator.

Returns a subrowvector of the calling rowvector.

Attention:
The subrowvector and the calling rowvector will share the same physical memory.
Parameters:
i1The starting element.
i2The ending element.
Returns:
A subrowvector of the calling rowvector.

Reimplemented from fmatvec::Matrix< General, AT >.

template<class AT >
const RowVector< AT > fmatvec::RowVector< AT >::operator() ( int  i1,
int  i2 
) const

Subvector operator.

See operator()(int,int);

Reimplemented from fmatvec::Matrix< General, AT >.

template<class AT >
RowVector< AT > fmatvec::RowVector< AT >::operator() ( const Index &  I)

Subrowvector operator.

Returns a subrowvector of the calling rowvector.

Attention:
The subrowvector and the calling rowvector will share the same physical memory.
Parameters:
IIndex containing the starting and the ending element.
Returns:
A subrowvector of the calling rowvector.

Reimplemented from fmatvec::Matrix< General, AT >.

References fmatvec::Index::end(), and fmatvec::Index::start().

template<class AT >
const RowVector< AT > fmatvec::RowVector< AT >::operator() ( const Index &  I) const

Subrowvector operator.

See operator()(const Index&)

Reimplemented from fmatvec::Matrix< General, AT >.

References fmatvec::Index::end(), and fmatvec::Index::start().

template<class AT >
RowVector< AT > & fmatvec::RowVector< AT >::operator<< ( const RowVector< AT > &  x)

Copy operator.

Copies the rowvector given by x.

Parameters:
xThe rowvector to be copied.
Returns:
A reference to the calling rowvector.

References fmatvec::RowVector< AT >::resize(), and fmatvec::RowVector< AT >::size().

Referenced by fmatvec::RowVector< AT >::operator=().

template<class AT>
RowVector<AT>& fmatvec::RowVector< AT >::operator= ( const RowVector< AT > &  x)
inline

Assignment operator.

Copies the rowvector given by x by calling operator<<().

Parameters:
xThe rowvector to be assigned.
Returns:
A reference to the calling rowvector.
Remarks:
To call operator>>() by default, define FMATVEC_NO_DEEP_ASSIGNMENT
See also:
operator<<(), operator>>()

References fmatvec::RowVector< AT >::operator<<(), and fmatvec::RowVector< AT >::operator>>().

template<class AT >
RowVector< AT > & fmatvec::RowVector< AT >::operator>> ( const RowVector< AT > &  x)

Reference operator.

References the rowvector given by x.

Parameters:
xThe rowvector to be referenced.
Returns:
A reference to the calling rowvector.

Referenced by fmatvec::RowVector< AT >::operator=().

template<class AT>
RowVector& fmatvec::RowVector< AT >::resize ( int  n)
inline

Rowvector resizing.

Resizes the rowvector to size n.

Parameters:
nThe size.
Returns:
A reference to the calling rowvector.
Remarks:
The rowvector will be initialised to zero by default. To change this behavior, define FMATVEC_NO_INITIALIZATION.

References fmatvec::Matrix< General, AT >::resize().

Referenced by fmatvec::RowVector< AT >::operator<<().

template<class AT>
RowVector& fmatvec::RowVector< AT >::resize ( int  n,
Initialization  ini,
const AT &  a = 0 
)
inline

Rowvector resizing.

Resizes the rowvector to size n. The vector will be initialized to the value given by a (default 0), if ini is set to INIT. If init is set to NONINIT, the vector will not be initialized.

Parameters:
nThe size.
iniINIT means initialization, NONINIT means no initialization.
aThe value, the rowvector will be initialized with (default 0)
Returns:
A reference to the calling rowvector.

References fmatvec::Matrix< General, AT >::resize().

template<class AT>
int fmatvec::RowVector< AT >::size ( ) const
inline

Size.

Returns:
The size of the rowvector.

Referenced by fmatvec::operator*(), fmatvec::operator-(), and fmatvec::RowVector< AT >::operator<<().


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