fmatvec 0.0.0

Public Types | Public Member Functions | Static Public Attributes | List of all members
fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT > Class Template Reference

This is a matrix class for symmetric matrices. More...

`#include <fixed_symmetric_matrix.h>`

## Public Types

using | value_type = AT
using | shape_type = Symmetric

## Public Member Functions

| Matrix (Noinit ini)
| Matrix (Init ini=INIT, const AT &a=AT())
| Matrix (Eye ini, const AT &a=1)
| Matrix (int m, int n, Noinit ini)
| Matrix (int m, int n, Init ini, const AT &a=AT())
| Matrix (int m, int n, Eye ini, const AT &a=1)
| Matrix (const Matrix< Symmetric, Fixed< M >, Fixed< M >, AT > &A)=default
| Copy Constructor. More...
template<class Row >
| Matrix (const Matrix< Symmetric, Row, Row, AT > &A)
| Copy Constructor. More...
template<class Type , class Row , class Col >
| Matrix (const Matrix< Type, Row, Col, AT > &A)
| Copy Constructor. More...
Matrix< Symmetric, Fixed< M >, Fixed< M >, AT > & | operator= (const Matrix< Symmetric, Fixed< M >, Fixed< M >, AT > &A)=default
| Assignment operator. More...
template<class Type , class Row , class Col >
Matrix< Symmetric, Fixed< M >, Fixed< M >, AT > & | operator= (const Matrix< Type, Row, Col, AT > &A)
| Assignment operator. More...
template<class Type , class Row , class Col >
Matrix< Symmetric, Fixed< M >, Fixed< M >, AT > & | operator<<= (const Matrix< Type, Row, Col, AT > &A)
| Matrix assignment. More...
void | resize (int n, int m)
AT & | operator() (int i, int j)
| Element operator. More...
const AT & | operator() (int i, int j) const
| Element operator. More...
AT & | ei (int i, int j)
const AT & | ei (int i, int j) const
AT & | ej (int i, int j)
const AT & | ej (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...
constexpr int | size () const
| Size. More...
constexpr int | rows () const
| Number of rows. More...
constexpr int | cols () const
| Number of columns. More...
int | ldim () const
| Leading dimension. More...
const CBLAS_ORDER | blasOrder () const
| Storage convention. More...
const CBLAS_UPLO | blasUplo () const
| Symmetry convention. More...
Matrix< Symmetric, Fixed< M >, Fixed< M >, AT > & | init (const AT &val=AT())
| Initialization. More...
Matrix< Symmetric, Fixed< M >, Fixed< M >, AT > & | init (Init, const AT &a=AT())
Matrix< Symmetric, Fixed< M >, Fixed< M >, AT > & | init (Eye, const AT &val=1)
Matrix< Symmetric, Fixed< M >, Fixed< M >, AT > & | init (Noinit, const AT &a=AT())
| operator std::vector< std::vector< AT >> () const
| Cast to std::vector<std::vector<AT>>. More...
| Matrix (const 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 FMATVEC_ASSERT checks for constant length of each row. More...

## Static Public Attributes

static constexpr bool | isVector {false}

## Detailed Description

### template<int M, class AT>
class fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >

This is a matrix class for symmetric matrices.

Template class Matrix of shape type SymmetricFixed. 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/4]

template<int M, class AT >

fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::Matrix | ( | const Matrix< Symmetric, Fixed< M >, Fixed< M >, AT > & | A | ) |

default

Copy Constructor.

Constructs a copy of the matrix A.

Parameters

  A | The matrix that will be copied.

## ◆ Matrix() [2/4]

template<int M, class AT >
template<class Row >

fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::Matrix | ( | const Matrix< Symmetric, Row, Row, AT > & | A | ) |

inline

Copy Constructor.

Constructs a copy of the matrix A.

Parameters

  A | The matrix that will be copied.

## ◆ Matrix() [3/4]

template<int M, class AT >
template<class Type , class Row , class Col >

fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::Matrix | ( | const Matrix< Type, Row, Col, AT > & | A | ) |

inline explicit

Copy Constructor.

Constructs a copy of the matrix A.

Parameters

  A | The matrix that will be copied.

## ◆ Matrix() [4/4]

template<int M, class AT >

fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::Matrix | ( | const std::vector< std::vector< AT >> & | m | ) |

inline explicit

std::vector<std::vector<AT>> Constructor. Constructs and initializes a matrix with a std::vector<std::vector<AT>> object. An FMATVEC_ASSERT checks for constant length of each row.

Parameters

  m | The std::vector<std::vector<AT>> the matrix will be initialized with.

## Member Function Documentation

## ◆ blasOrder()

template<int M, class AT >

const CBLAS_ORDER fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::blasOrder | ( |  | ) | const

inline

Storage convention.

Returns the blas-conform storage convention. The elements are stored in columnmajor form, i.e. the elements are stored columnwise.

Returns
  CblasRowMajor.

## ◆ blasUplo()

template<int M, class AT >

const CBLAS_UPLO fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::blasUplo | ( |  | ) | const

inline

Symmetry convention.

Returns the blas-conform symmetry convention. The elements are stored in the lower triangular part of the array,

Returns
  CblasLower.

## ◆ cols()

template<int M, class AT >

constexpr int fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::cols | ( |  | ) | const

inline

Number of columns.

Returns
  The number of columns of the matrix

## ◆ init()

template<int M, class AT >

Matrix< Symmetric, Fixed< M >, Fixed< M >, AT > & fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::init | ( | const AT & | val = `AT()` | ) |

inline

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.

## ◆ ldim()

template<int M, class AT >

int fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::ldim | ( |  | ) | const

inline

Leading dimension.

Returns
  The leading dimension of the matrix

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

template<int M, class AT >

fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::operator std::vector< std::vector< AT >> | ( |  | ) | const

inline explicit

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

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

## ◆ operator()() [1/4]

template<int M, class AT >

AT& fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::operator() | ( | int | i,
|  | int | j
| ) |  |

inline

Element operator.

Returns a reference to the element in the i-th row and the j-th column.

Parameters

  i | The i-th row of the matrix
  j | The j-th column of the matrix

Returns
  A reference to the element A(i,j).

Remarks
  The bounds are checked in debug mode.

See also
  operator()(int,int) const

## ◆ operator()() [2/4]

template<int M, class AT >

const AT& fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::operator() | ( | int | i,
|  | int | j
| ) |  | const

inline

Element operator.

See operator()(int,int)

## ◆ operator()() [3/4]

template<int M, class AT >

AT* fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::operator() | ( |  | ) |

inline

Pointer operator.

Returns the pointer to the first element.

Returns
  The pointer to the first element.

## ◆ operator()() [4/4]

template<int M, class AT >

const AT* fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::operator() | ( |  | ) | const

inline

Pointer operator.

See operator()()

## ◆ operator<<=()

template<int M, class AT >
template<class Type , class Row , class Col >

Matrix<Symmetric,Fixed<M>,Fixed<M>,AT>& fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::operator<<= | ( | const Matrix< Type, Row, Col, AT > & | A | ) |

inline

Matrix assignment.

Copies the matrix given by A.

Parameters

  A | The matrix to be copied.

Returns
  A reference to the calling matrix.

## ◆ operator=() [1/2]

template<int M, class AT >

Matrix<Symmetric,Fixed<M>,Fixed<M>,AT>& fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::operator= | ( | const Matrix< Symmetric, Fixed< M >, Fixed< M >, AT > & | A | ) |

inline default

Assignment operator.

Copies the symmetric matrix given by A.

Parameters

  A | The matrix to be assigned.

Returns
  A reference to the calling matrix.

## ◆ operator=() [2/2]

template<int M, class AT >
template<class Type , class Row , class Col >

Matrix<Symmetric,Fixed<M>,Fixed<M>,AT>& fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::operator= | ( | const Matrix< Type, Row, Col, AT > & | A | ) |

inline

Assignment operator.

Copies the symmetric matrix given by A.

Parameters

  A | The matrix to be assigned.

Returns
  A reference to the calling matrix.

## ◆ resize()

template<int M, class AT >

void fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::resize | ( | int | n,
|  | int | m
| ) |  |

inline

Resize a fixed matrix Do nothing for the fixed dimension and throw for any other dimension.

## ◆ rows()

template<int M, class AT >

constexpr int fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, AT >::rows | ( |  | ) | const

inline

Number of rows.

Returns
  The number of rows of the matrix

## ◆ size()

template<int M, class AT >

constexpr int fmatvec::Matrix< Symmetric, Fixed< M >, Fixed< M >, 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:

- /mbsim-env/fmatvec/fmatvec/fixed_symmetric_matrix.h