fmatvec  2.0.0
Fast Matrix/Vector Library
Public Types | Public Member Functions | List of all members
fmatvec::Matrix< Sparse, Ref, Ref, AT > Class Template Reference

This is a matrix class for sparse quadratic matrices. More...

#include <sparse_matrix.h>

Public Types

typedef AT value_type
 

Public Member Functions

 Matrix ()
 Standard constructor. More...
 
 Matrix (int m_, int n_, int k_, Noinit)
 
 Matrix (int m_, int n_, int k_, Init ini=INIT, const AT &a=AT())
 
 Matrix (int n_, Noinit)
 
 Matrix (int n_, Init ini=INIT, const AT &a=AT())
 
 Matrix (int m_, int n_, Noinit)
 
 Matrix (int m_, int n_, Init ini=INIT, const AT &a=AT())
 
 Matrix (const Matrix< Sparse, Ref, Ref, AT > &A)
 Copy Constructor. More...
 
 ~Matrix ()=default
 Destructor.
 
Matrix< Sparse, Ref, Ref, AT > & resize (int n_, int k_, Noinit)
 
Matrix< Sparse, Ref, Ref, AT > & resize (int n, int k, Init ini=INIT, const AT &a=AT())
 
Matrix< Sparse, Ref, Ref, AT > & operator= (const Matrix< Sparse, Ref, Ref, AT > &A)
 Assignment operator. More...
 
template<class Type , class Row , class Col >
Matrix< Sparse, Ref, Ref, AT > & operator= (const Matrix< Type, Row, Col, AT > &A)
 Assignment operator. More...
 
Matrix< Sparse, Ref, Ref, AT > & operator&= (Matrix< Sparse, Ref, Ref, AT > &A)
 Reference operator. More...
 
template<class Type , class Row , class Col >
Matrix< Sparse, Ref, Ref, AT > & operator<<= (const Matrix< Type, Row, Col, AT > &A)
 Matrix assignment. More...
 
const AT * operator() () const
 Pointer operator. More...
 
AT * operator() ()
 Pointer operator. More...
 
AT & operator() (int i, int j)
 
const AT & operator() (int i, int j) const
 
int ldim ()
 
const int * Ip () const
 Pointer operator. More...
 
int * Ip ()
 Pointer operator. More...
 
const int * Jp () const
 Pointer operator. More...
 
int * Jp ()
 Pointer operator. More...
 
int rows () const
 Number of rows. More...
 
int cols () const
 Number of columns. More...
 
const CBLAS_ORDER blasOrder () const
 Storage convention.
 
Matrix< Sparse, Ref, Ref, AT > & init (const AT &val)
 Initialization. More...
 
Matrix< Sparse, Ref, Ref, AT > & init (Init, const AT &a=AT())
 
Matrix< Sparse, Ref, Ref, AT > & init (Noinit, const AT &a=AT())
 
int countElements () const
 

Detailed Description

template<class AT>
class fmatvec::Matrix< Sparse, Ref, Ref, AT >

This is a matrix class for sparse quadratic matrices.

Template class Matrix with shape type Sparse and atomic type AT. The matrix ist stored in compressed row-wise skyline format, BUT the diagonal elements are ALWAYS stored (even if they are zero) as the FIRST entry of each row. 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

◆ Matrix() [1/2]

template<class AT >
fmatvec::Matrix< Sparse, Ref, Ref, AT >::Matrix ( )
inlineexplicit

Standard constructor.

Constructs a matrix with no size.

◆ Matrix() [2/2]

template<class AT >
fmatvec::Matrix< Sparse, Ref, Ref, AT >::Matrix ( const Matrix< Sparse, Ref, Ref, AT > &  A)
inline

Copy Constructor.

Constructs a reference to the matrix A.

Parameters
AThe matrix that will be referenced.

Member Function Documentation

◆ cols()

template<class AT >
int fmatvec::Matrix< Sparse, Ref, Ref, AT >::cols ( ) const
inline

Number of columns.

Returns
The number of columns of the matrix

◆ init()

template<class AT >
Matrix< Sparse, Ref, Ref, AT > & fmatvec::Matrix< Sparse, Ref, Ref, AT >::init ( const AT &  val)

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.

◆ Ip() [1/2]

template<class AT >
const int* fmatvec::Matrix< Sparse, Ref, Ref, AT >::Ip ( ) const
inline

Pointer operator.

See Ip()

◆ Ip() [2/2]

template<class AT >
int* fmatvec::Matrix< Sparse, Ref, Ref, AT >::Ip ( )
inline

Pointer operator.

Todo:
Docu

◆ Jp() [1/2]

template<class AT >
const int* fmatvec::Matrix< Sparse, Ref, Ref, AT >::Jp ( ) const
inline

Pointer operator.

See Jp()

◆ Jp() [2/2]

template<class AT >
int* fmatvec::Matrix< Sparse, Ref, Ref, AT >::Jp ( )
inline

Pointer operator.

Todo:
Docu

◆ operator&=()

template<class AT >
Matrix<Sparse,Ref,Ref,AT>& fmatvec::Matrix< Sparse, Ref, Ref, AT >::operator&= ( Matrix< Sparse, Ref, Ref, AT > &  A)
inline

Reference operator.

References the sparse matrix given by A.

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

◆ operator()() [1/2]

template<class AT >
const AT* fmatvec::Matrix< Sparse, Ref, Ref, AT >::operator() ( ) const
inline

Pointer operator.

See operator()()

◆ operator()() [2/2]

template<class AT >
AT* fmatvec::Matrix< Sparse, Ref, Ref, AT >::operator() ( )
inline

Pointer operator.

Returns the pointer to the first element.

Returns
The pointer to the first element.

◆ operator<<=()

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

Matrix assignment.

Copies the sparse matrix given by A.

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

◆ operator=() [1/2]

template<class AT >
Matrix<Sparse,Ref,Ref,AT>& fmatvec::Matrix< Sparse, Ref, Ref, AT >::operator= ( const Matrix< Sparse, Ref, Ref, AT > &  A)
inline

Assignment operator.

Copies the sparse 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 >
Matrix<Sparse,Ref,Ref,AT>& fmatvec::Matrix< Sparse, Ref, Ref, AT >::operator= ( const Matrix< Type, Row, Col, AT > &  A)
inline

Assignment operator.

Copies the sparse matrix given by A.

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

◆ rows()

template<class AT >
int fmatvec::Matrix< Sparse, Ref, Ref, AT >::rows ( ) const
inline

Number of rows.

Returns
The number of rows of the matrix

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