fmatvec 0.0.0

Public Types | Public Member Functions | Static Public Attributes | 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

using | value_type = AT
using | shape_type = Sparse

## 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 (const Matrix< Sparse, Ref, Ref, AT > &A)
| Copy Constructor. More...
| Matrix (int m_, int n_, int k_, int *I_, int *J_, Init ini=INIT, const AT &a=AT())
| ~Matrix ()=default
| Destructor.
Matrix< Sparse, Ref, Ref, AT > & | resize (int m_, int n_, int k_, Noinit)
Matrix< Sparse, Ref, Ref, AT > & | resize (int m, int n, int k, Init ini=INIT, const AT &a=AT())
void | resize (int m, int n)
| Resize a sparse matrix.
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
AT & | e (int i, int j)
const AT & | e (int i, int j) const
int | pos (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 | nonZeroElements () const

## Static Public Attributes

static constexpr bool | isVector {false}

## 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 | ( |  | ) |

inline explicit

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

  A | The 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

  a | Value 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

  A | The 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

  A | The 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

  A | The 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

  A | The 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:

- /mbsim-env/fmatvec/fmatvec/sparse_matrix.h