fmatvec  0.0.0
fmatvec::Matrix< Type, Row, Col, AT > Class Template Reference

This is the basic matrix class for arbitrary matrices. More...

#include <matrix.h>

Public Types

using value_type = AT
 
using shape_type = Type
 

Public Member Functions

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}
 

Detailed Description

template<class Type, class Row, class Col, class AT>
class fmatvec::Matrix< Type, Row, Col, AT >

This is the basic matrix class for arbitrary matrices.

Enumerate for initialization of matrices

Template class Matrix with shape type ST and atomic type AT. The first template parameter defines the shape type, the second parameter the atomic type of the matrix. Valid shape types are General, Symmetric, GeneralBand, Diagonal, Sparse and SparseSymmetric. Valid atomic types are int, float, double, complex<float> and complex<double>

Member Function Documentation

◆ cols()

template<class Type , class Row , class Col , class AT >
int fmatvec::Matrix< Type, Row, Col, AT >::cols ( ) const

Number of columns.

Returns
The number of columns of the matrix.

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

template<class Type , class Row , class Col , class AT >
fmatvec::Matrix< Type, Row, Col, AT >::operator std::vector< std::vector< AT > >

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

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

◆ operator()() [1/2]

template<class Type , class Row , class Col , class AT >
AT & fmatvec::Matrix< Type, Row, Col, AT >::operator() ( int  i,
int  j 
)
inline

Standard constructor.

The standard constructor.

Parameters
mThe number of rows
nThe number of columns *‍/ Matrix(int m, int n) {}
  /*! \brief Element operator

     Returns a reference to the element in the i-th row and the j-th column. 
     \param i The i-th row of the matrix
     \param j The j-th column of the matrix
     \return A reference to the element A(i,j).
     \sa operator()(int,int) const

◆ operator()() [2/2]

template<class Type , class Row , class Col , class AT >
const AT & fmatvec::Matrix< Type, Row, Col, AT >::operator() ( int  i,
int  j 
) const
inline

Element operator.

See operator()(int,int)

◆ rows()

template<class Type , class Row , class Col , class AT >
int fmatvec::Matrix< Type, Row, Col, AT >::rows ( ) const

Number of rows.

Returns
The number of rows of the matrix.

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