Public Member Functions
fmatvec::Matrix< Symmetric, Var, Var, AT > Class Template Reference

This is a matrix class for symmetric matrices. More...

#include <var_symmetric_matrix.h>

List of all members.

Public Member Functions

 Matrix ()
 Standard constructor.
 Matrix (int m, Noinit)
 Matrix (int m, Init ini=INIT, const AT &a=0)
 Matrix (int m, Eye ini, const AT &a=1)
 Matrix (int m, int n, Noinit)
 Matrix (int m, int n, Init ini=INIT, const AT &a=0)
 Matrix (int m, int n, Eye ini, const AT &a=1)
 Matrix (const Matrix< Symmetric, Var, Var, AT > &A)
 Copy Constructor.
template<class Row >
 Matrix (const Matrix< Symmetric, Row, Row, AT > &A)
template<int M>
 Matrix (const Matrix< General, Fixed< M >, Fixed< M >, AT > &A)
template<class Type , class Row , class Col >
 Matrix (const Matrix< Type, Row, Col, AT > &A)
 ~Matrix ()
 Destructor.
Matrix< Symmetric, Var, Var, AT > & resize ()
Matrix< Symmetric, Var, Var, AT > & resize (int m, Noinit)
Matrix< Symmetric, Var, Var, AT > & resize (int m, Init ini=INIT, const AT &a=0)
Matrix< Symmetric, Var, Var, AT > & resize (int m, Eye ini, const AT &a=1)
Matrix< Symmetric, Var, Var, AT > & operator= (const Matrix< Symmetric, Var, Var, AT > &A)
 Assignment operator.
template<class Type , class Row , class Col >
Matrix< Symmetric, Var, Var, AT > & operator= (const Matrix< Type, Row, Col, AT > &A)
template<class Type , class Row , class Col >
Matrix< Symmetric, Var, Var, AT > & operator<< (const Matrix< Type, Row, Col, AT > &A)
AT & operator() (int i, int j)
 Element operator.
const AT & operator() (int i, int j) const
 Element operator.
AT & ei (int i, int j)
const AT & ei (int i, int j) const
AT & ej (int i, int j)
const AT & ej (int i, int j) const
AT & e (int i, int j)
const AT & e (int i, int j) const
AT * operator() ()
 Pointer operator.
const AT * operator() () const
 Pointer operator.
int size () const
 Size.
int rows () const
 Number of rows.
int cols () const
 Number of columns.
int ldim () const
 Leading dimension.
const CBLAS_ORDER blasOrder () const
 Storage convention.
const CBLAS_UPLO blasUplo () const
 Symmetry convention.
Matrix< Symmetric, Var, Var, AT > & init (const AT &a=0)
 Initialization.
Matrix< Symmetric, Var, Var, AT > & init (Init, const AT &a=0)
Matrix< Symmetric, Var, Var, AT > & init (Eye eye, const AT &a=1)
Matrix< Symmetric, Var, Var, AT > & init (Noinit, const AT &a=0)
 operator std::vector< std::vector< AT > > ()
 Cast to std::vector<std::vector<AT> >.

Detailed Description

template<class AT>
class fmatvec::Matrix< Symmetric, Var, Var, AT >

This is a matrix class for symmetric matrices.

Template class Matrix of shape type SymmetricVar. The template parameter AT defines the atomic type of the matrix. Valid types are int, float, double, complex<float> and complex<double>


Constructor & Destructor Documentation

template<class AT >
fmatvec::Matrix< Symmetric, Var, Var, AT >::Matrix ( ) [inline]

Standard constructor.

Constructs a matrix with no size.

template<class AT >
fmatvec::Matrix< Symmetric, Var, Var, AT >::Matrix ( const Matrix< Symmetric, Var, Var, AT > &  A) [inline]

Copy Constructor.

Constructs a reference to the matrix A.

Attention:
The physical memory of the matrix A will not be copied, only referenced.
Parameters:
AThe matrix that will be referenced.

Member Function Documentation

template<class AT >
const CBLAS_ORDER fmatvec::Matrix< Symmetric, Var, Var, AT >::blasOrder ( ) const [inline]

Storage convention.

Returns the blas-conform storage convention. The elements are stored in columnmajor form, i.e. the elements are stored columnwise.

Returns:
CblasColMajor.
template<class AT >
const CBLAS_UPLO fmatvec::Matrix< Symmetric, Var, Var, AT >::blasUplo ( ) const [inline]

Symmetry convention.

Returns the blas-conform symmetry convention. The elements are stored in the lower triangular part of the array,

Returns:
CblasLower.
template<class AT >
int fmatvec::Matrix< Symmetric, Var, Var, AT >::cols ( ) const [inline]

Number of columns.

Returns:
The number of columns of the matrix
template<class AT >
Matrix< Symmetric, Var, Var, AT > & fmatvec::Matrix< Symmetric, Var, Var, AT >::init ( const AT &  a = 0) [inline]

Initialization.

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

Parameters:
aValue all elements will be initialized with.
Returns:
A reference to the calling matrix.
template<class AT >
int fmatvec::Matrix< Symmetric, Var, Var, AT >::ldim ( ) const [inline]

Leading dimension.

Returns:
The leading dimension of the matrix
template<class AT >
fmatvec::Matrix< Symmetric, Var, Var, AT >::operator std::vector< std::vector< AT > > ( ) [inline]

Cast to std::vector<std::vector<AT> >.

Returns:
The std::vector<std::vector<AT> > representation of the matrix
template<class AT >
AT& fmatvec::Matrix< Symmetric, Var, Var, AT >::operator() ( int  i,
int  j 
) [inline]

Element operator.

Returns a reference to the element in the i-th row and the j-th column.

Parameters:
iThe i-th row of the matrix
jThe j-th column of the matrix
Returns:
A reference to the element A(i,j).
Remarks:
The bounds are checked by default. To change this behavior, define FMATVEC_NO_BOUNDS_CHECK.
See also:
operator()(int,int) const
template<class AT >
const AT& fmatvec::Matrix< Symmetric, Var, Var, AT >::operator() ( int  i,
int  j 
) const [inline]

Element operator.

See operator()(int,int)

template<class AT >
AT* fmatvec::Matrix< Symmetric, Var, Var, AT >::operator() ( ) [inline]

Pointer operator.

Returns the pointer to the first element.

Returns:
The pointer to the first element.
template<class AT >
const AT* fmatvec::Matrix< Symmetric, Var, Var, AT >::operator() ( ) const [inline]

Pointer operator.

See operator()()

template<class AT >
Matrix< Symmetric, Var, Var, AT > & fmatvec::Matrix< Symmetric, Var, Var, AT >::operator= ( const Matrix< Symmetric, Var, Var, AT > &  A) [inline]

Assignment operator.

Copies the symmetric matrix given by A.

Parameters:
AThe matrix to be assigned.
Returns:
A reference to the calling matrix.

References size().

template<class AT >
int fmatvec::Matrix< Symmetric, Var, Var, AT >::rows ( ) const [inline]

Number of rows.

Returns:
The number of rows of the matrix
template<class AT >
int fmatvec::Matrix< Symmetric, Var, Var, AT >::size ( ) const [inline]

Size.

Returns:
The number of rows and columns of the matrix

Referenced by operator=().


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