All Classes Namespaces Functions Typedefs Enumerations Pages
Public Member Functions | List of all members
fmatvec::SquareMatrix< Ref, AT > Class Template Reference

This is a matrix class of general quadratic matrices. More...

#include <square_matrix.h>

Inheritance diagram for fmatvec::SquareMatrix< Ref, AT >:
fmatvec::Matrix< General, Ref, Ref, AT >

Public Member Functions

 SquareMatrix ()
 Standard constructor. More...
 
 SquareMatrix (int m, Noinit ini)
 
 SquareMatrix (int m, Init ini=INIT, const AT &a=0)
 
 SquareMatrix (int m, Eye ini, const AT &a=1)
 
 SquareMatrix (int m, AT *ele)
 Regular Constructor. More...
 
 SquareMatrix (const char *str)
 
 SquareMatrix (const SquareMatrix< Ref, AT > &A)
 Copy Constructor. More...
 
 SquareMatrix (const Matrix< General, Ref, Ref, AT > &A)
 Copy Constructor. More...
 
template<class Type , class Row , class Col >
 SquareMatrix (const Matrix< Type, Row, Col, AT > &x)
 
SquareMatrix< Ref, AT > & resize ()
 
SquareMatrix< Ref, AT > & resize (int m, Noinit)
 
SquareMatrix< Ref, AT > & resize (int m, Init ini=INIT, const AT &a=0)
 
SquareMatrix< Ref, AT > & resize (int m, Eye ini, const AT &a=1)
 
SquareMatrix< Ref, AT > & operator= (const SquareMatrix< Ref, AT > &A)
 Assignment operator. More...
 
template<class Type , class Row , class Col >
SquareMatrix< Ref, AT > & operator<< (const Matrix< Type, Row, Col, AT > &A)
 Copy operator. More...
 
SquareMatrix< Ref, AT > & operator>> (const SquareMatrix< Ref, AT > &A)
 Reference operator. More...
 
SquareMatrix< Ref, AT > & operator>> (const Matrix< General, Ref, Ref, AT > &A)
 
int size () const
 Size. More...
 
SquareMatrix< Ref, AT > copy () const
 Matrix duplicating. More...
 
 operator std::vector< std::vector< AT > > ()
 Cast to std::vector<std::vector<AT> >. More...
 
SquareMatrix< Ref, AT > T ()
 
const SquareMatrix< Ref, AT > T () const
 
- Public Member Functions inherited from fmatvec::Matrix< General, Ref, Ref, AT >
 Matrix ()
 Standard constructor. More...
 
 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< General, Ref, Ref, AT > &A)
 Copy Constructor. More...
 
 Matrix (int m_, int n_, AT *ele_)
 Regular Constructor. More...
 
 Matrix (const char *str)
 String Constructor. More...
 
 ~Matrix ()
 Destructor.
 
template<class Type , class Row , class Col >
 Matrix (const Matrix< Type, Row, Col, AT > &A)
 
Matrix< General, Ref, Ref, AT > & resize ()
 
Matrix< General, Ref, Ref, AT > & resize (int m_, int n_, Noinit)
 
Matrix< General, Ref, Ref, AT > & resize (int m, int n, Init ini=INIT, const AT &a=0)
 
Matrix< General, Ref, Ref, AT > & resize (int m, int n, Eye ini, const AT &a=1)
 
Matrix< General, Ref, Ref, AT > & operator= (const Matrix< General, Ref, Ref, AT > &A)
 Assignment operator. More...
 
template<class Type , class Row , class Col >
Matrix< General, Ref, Ref, AT > & operator= (const Matrix< Type, Row, Col, AT > &A)
 
template<class Type , class Row , class Col >
Matrix< General, Ref, Ref, AT > & operator<< (const Matrix< Type, Row, Col, AT > &A)
 Copy operator. More...
 
Matrix< General, Ref, Ref, AT > & operator>> (const Matrix< General, Ref, Ref, AT > &A)
 Reference operator. More...
 
AT & operator() (int i, int j)
 Element operator. More...
 
const AT & operator() (int i, int j) const
 Element operator. More...
 
AT & er (int i, int j)
 
const AT & er (int i, int j) const
 
AT & et (int i, int j)
 
const AT & et (int i, int j) const
 
AT & e (int i, int j)
 
const AT & e (int i, int j) const
 
AT * operator() ()
 Pointer operator. More...
 
const AT * operator() () const
 Pointer operator. More...
 
int rows () const
 Number of rows. More...
 
int cols () const
 Number of columns. More...
 
int ldim () const
 Leading dimension. More...
 
bool transposed () const
 Transposed status. More...
 
const CBLAS_TRANSPOSE blasTrans () const
 Transposed status. More...
 
const CBLAS_ORDER blasOrder () const
 Storage convention. More...
 
Matrix< General, Ref, Ref, AT > operator() (int i1, int j1, int i2, int j2)
 Submatrix operator. More...
 
const Matrix< General, Ref,
Ref, AT > 
operator() (int i1, int j1, int i2, int j2) const
 Submatrix operator. More...
 
Matrix< General, Ref, Ref, AT > operator() (const Index &I, const Index &J)
 Submatrix operator. More...
 
const Matrix< General, Ref,
Ref, AT > 
operator() (const Index &I, const Index &J) const
 Submatrix operator. More...
 
SquareMatrix< Ref, AT > operator() (const Index &I)
 Submatrix operator. More...
 
const SquareMatrix< Ref, AT > operator() (const Index &I) const
 Submatrix operator. More...
 
Vector< Ref, AT > col (int i)
 Column operator. More...
 
const Vector< Ref, AT > col (int i) const
 Column operator. More...
 
RowVector< Ref, AT > row (int i)
 Row operator. More...
 
const RowVector< Ref, AT > row (int i) const
 Row operator. More...
 
Matrix< General, Ref, Ref, AT > copy () const
 Matrix duplicating. More...
 
Matrix< General, Ref, Ref, AT > & init (const AT &a=0)
 Initialization. More...
 
Matrix< General, Ref, Ref, AT > & init (Init, const AT &a=0)
 
Matrix< General, Ref, Ref, AT > & init (Eye, const AT &a=1)
 
Matrix< General, Ref, Ref, AT > & init (Noinit, const AT &a=0)
 
Matrix< General, Ref, Ref, AT > & init0 (const AT &a=0)
 
Matrix< General, Ref, Ref, AT > & init0 (Init, const AT &a=0)
 
 operator std::vector< std::vector< AT > > ()
 Cast to std::vector<std::vector<AT> >. More...
 
 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. More...
 
Matrix< General, Ref, Ref, AT > T ()
 
const Matrix< General, Ref,
Ref, AT > 
T () const
 

Detailed Description

template<class AT>
class fmatvec::SquareMatrix< Ref, AT >

This is a matrix class of general quadratic matrices.

Template class SquareMatrix with shape type General and atomic type AT. The 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<class AT >
fmatvec::SquareMatrix< Ref, AT >::SquareMatrix ( )
inline

Standard constructor.

Constructs a squarematrix with no size.

template<class AT >
fmatvec::SquareMatrix< Ref, AT >::SquareMatrix ( int  m,
AT *  ele 
)
inline

Regular Constructor.

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

Parameters
mThe number of rows and columns.
eleThe physical memory the matrix will point to.
template<class AT >
fmatvec::SquareMatrix< Ref, AT >::SquareMatrix ( const SquareMatrix< Ref, 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.
template<class AT >
fmatvec::SquareMatrix< Ref, AT >::SquareMatrix ( const Matrix< General, Ref, Ref, AT > &  A)
inlineexplicit

Copy Constructor.

See SquareMatrix(const SquareMatrix<General,Ref,Ref,AT>&)

Member Function Documentation

template<class AT >
SquareMatrix< Ref, AT > fmatvec::SquareMatrix< Ref, AT >::copy ( ) const
inline

Matrix duplicating.

The calling matrix returns a deep copy of itself.

Returns
The duplicate.
template<class AT >
fmatvec::SquareMatrix< Ref, 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 >
template<class Type , class Row , class Col >
SquareMatrix<Ref,AT>& fmatvec::SquareMatrix< Ref, AT >::operator<< ( const Matrix< Type, Row, Col, AT > &  A)
inline

Copy operator.

Copies the matrix given by A.

Parameters
AThe matrix to be copied.
Returns
A reference to the calling matrix.
template<class AT >
SquareMatrix<Ref,AT>& fmatvec::SquareMatrix< Ref, AT >::operator= ( const SquareMatrix< Ref, AT > &  A)
inline

Assignment operator.

Copies the matrix given by A by calling operator<<().

Parameters
AThe matrix to be assigned.
Returns
A reference to the calling matrix.
Remarks
To call operator>>() by default, define FMATVEC_NO_DEEP_ASSIGNMENT
See Also
operator<<(), operator>>()
template<class AT >
SquareMatrix<Ref,AT>& fmatvec::SquareMatrix< Ref, AT >::operator>> ( const SquareMatrix< Ref, AT > &  A)
inline

Reference operator.

References the matrix given by A.

Parameters
AThe matrix to be referenced.
Returns
A reference to the calling matrix.
template<class AT >
int fmatvec::SquareMatrix< Ref, AT >::size ( ) const
inline

Size.

Returns
The number of rows and columns of the matrix.

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

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML