fmatvec  0.0.0
Fast Matrix/Vector Library
Public Types | Public Member Functions | Static Public Attributes | List of all members
fmatvec::SquareMatrix< Var, AT > Class Template Reference

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

#include <var_square_matrix.h>

Inheritance diagram for fmatvec::SquareMatrix< Var, AT >:
[legend]

Public Types

typedef AT value_type
 
typedef Square shape_type
 
- Public Types inherited from fmatvec::Matrix< General, Var, Var, AT >
typedef AT value_type
 
typedef General shape_type
 

Public Member Functions

 SquareMatrix ()
 Standard constructor. More...
 
 SquareMatrix (int m, Noinit ini)
 
 SquareMatrix (int m, Init ini=INIT, const AT &a=AT())
 
 SquareMatrix (int m, Eye ini, const AT &a=1)
 
 SquareMatrix (SquareMatrix< Var, AT > &&src)
 
SquareMatrix< Var, AT > & operator= (SquareMatrix< Var, AT > &&src)
 
 SquareMatrix (const SquareMatrix< Var, AT > &A)
 Copy Constructor. More...
 
template<class Row >
 SquareMatrix (const SquareMatrix< Row, AT > &A)
 Copy Constructor. More...
 
template<class Type , class Row , class Col >
 SquareMatrix (const Matrix< Type, Row, Col, AT > &A)
 Copy Constructor. More...
 
 SquareMatrix (const char *str)
 
SquareMatrix< Var, AT > & resize (int m, Noinit)
 
SquareMatrix< Var, AT > & resize (int m, Init ini=INIT, const AT &a=AT())
 
SquareMatrix< Var, AT > & resize (int m, Eye ini, const AT &a=1)
 
void resize (int m, int n)
 
SquareMatrix< Var, AT > & operator= (const SquareMatrix< Var, AT > &A)
 Assignment operator. More...
 
template<class Type , class Row , class Col >
SquareMatrix< Var, AT > & operator= (const Matrix< Type, Row, Col, AT > &A)
 Assignment operator. More...
 
template<class Type , class Row , class Col >
SquareMatrix< Var, AT > & operator<<= (const Matrix< Type, Row, Col, AT > &A)
 Matrix assignment. More...
 
SquareMatrix< Var, AT > & operator<<= (SquareMatrix< Var, AT > &&src)
 
int size () const
 Size. More...
 
int rows () const
 
int cols () const
 
 operator std::vector< std::vector< AT >> () const
 Cast to std::vector<std::vector<AT>>. More...
 
const SquareMatrix< Var, AT > T () const
 
- Public Member Functions inherited from fmatvec::Matrix< General, Var, Var, AT >
AT & operator() (int i, int j)
 Standard constructor. More...
 
const AT & operator() (int i, int j) const
 Element operator. More...
 
AT & e (int i, int j)
 
const AT & e (int i, int j) const
 
int rows () const
 Number of rows. More...
 
int cols () const
 Number of columns. More...
 
 operator std::vector< std::vector< AT >> () const
 Cast to std::vector<std::vector<AT>>. More...
 

Static Public Attributes

static constexpr bool isVector {false}
 
- Static Public Attributes inherited from fmatvec::Matrix< General, Var, Var, AT >
static constexpr bool isVector
 

Detailed Description

template<class AT>
class fmatvec::SquareMatrix< Var, 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

◆ SquareMatrix() [1/4]

template<class AT >
fmatvec::SquareMatrix< Var, AT >::SquareMatrix ( )
inlineexplicit

Standard constructor.

Constructs a squarematrix with no size.

◆ SquareMatrix() [2/4]

template<class AT >
fmatvec::SquareMatrix< Var, AT >::SquareMatrix ( const SquareMatrix< Var, AT > &  A)
inline

Copy Constructor.

See SquareMatrix(const SquareMatrix<AT>&)

◆ SquareMatrix() [3/4]

template<class AT >
template<class Row >
fmatvec::SquareMatrix< Var, AT >::SquareMatrix ( const SquareMatrix< Row, AT > &  A)
inline

Copy Constructor.

See SquareMatrix(const SquareMatrix<AT>&)

◆ SquareMatrix() [4/4]

template<class AT >
template<class Type , class Row , class Col >
fmatvec::SquareMatrix< Var, AT >::SquareMatrix ( const Matrix< Type, Row, Col, AT > &  A)
inlineexplicit

Copy Constructor.

See SquareMatrix(const SquareMatrix<AT>&)

Member Function Documentation

◆ operator std::vector< std::vector< AT >>()

template<class AT >
fmatvec::SquareMatrix< Var, AT >::operator std::vector< std::vector< AT >> ( ) const
inlineexplicit

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

Returns
The std::vector<std::vector<AT>> representation of the matrix

◆ operator<<=()

template<class AT >
template<class Type , class Row , class Col >
SquareMatrix<Var,AT>& fmatvec::SquareMatrix< Var, AT >::operator<<= ( const Matrix< Type, Row, Col, AT > &  A)
inline

Matrix assignment.

Copies the matrix given by A.

Parameters
AThe matrix to be copied.
Returns
A reference to the calling matrix.

◆ operator=() [1/2]

template<class AT >
SquareMatrix<Var,AT>& fmatvec::SquareMatrix< Var, AT >::operator= ( const SquareMatrix< Var, AT > &  A)
inline

Assignment operator.

Copies the matrix given by A.

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

◆ operator=() [2/2]

template<class AT >
template<class Type , class Row , class Col >
SquareMatrix<Var,AT>& fmatvec::SquareMatrix< Var, AT >::operator= ( const Matrix< Type, Row, Col, AT > &  A)
inline

Assignment operator.

Copies the matrix given by A.

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

◆ resize()

template<class AT >
void fmatvec::SquareMatrix< Var, AT >::resize ( int  m,
int  n 
)
inline

Resize a var square matrix. Throw if the dimensions does not match or resize to this dimension.

◆ size()

template<class AT >
int fmatvec::SquareMatrix< Var, 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: