fmatvec 0.0.0

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

using | value_type = AT
using | shape_type = Square
Public Types inherited from fmatvec::Matrix< General, Var, Var, AT >
using | value_type = AT
using | shape_type = General
using | iterator = AT *
using | const_iterator = const AT *

## 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) noexcept
SquareMatrix< Var, AT > & | operator= (SquareMatrix< Var, AT > &&src) noexcept
| 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...
| SquareMatrix (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 ro, UseExceptions<AT>::EXw. More...
const SquareMatrix< Var, AT > | T () const
Public Member Functions inherited from fmatvec::Matrix< General, Var, Var, AT >
| Matrix ()
| Standard constructor. More...
| Matrix (int m, int n, Noinit)
| Matrix (int m, int n, Init ini=INIT, const AT &a=AT())
| Matrix (int m, int n, Eye ini, const AT &a=1)
| Matrix (Matrix< General, Var, Var, AT > &&src) noexcept
Matrix< General, Var, Var, AT > & | operator= (Matrix< General, Var, Var, AT > &&src) noexcept
| Matrix (const Matrix< General, Var, Var, AT > &A)
| Copy Constructor. More...
template<class Row , class Col >
| Matrix (const Matrix< General, Row, Col, AT > &A)
| Copy Constructor. More...
template<class Type , class Row , class Col >
| Matrix (const Matrix< Type, Row, Col, AT > &A)
| Copy Constructor. More...
| Matrix (const std::string &strs)
| String Constructor. More...
| Matrix (const char *strs)
| ~Matrix ()
| Destructor.
iterator | begin ()
iterator | end ()
const_iterator | begin () const
const_iterator | end () const
Matrix< General, Var, Var, AT > & | resize (int m, int n, Noinit)
Matrix< General, Var, Var, AT > & | resize (int m, int n, Init ini=INIT, const AT &a=AT())
Matrix< General, Var, Var, AT > & | resize (int m, int n, Eye ini, const AT &a=1)
Matrix< General, Var, Var, AT > & | operator= (const Matrix< General, Var, Var, AT > &A)
| Assignment operator. More...
template<class Type , class Row , class Col >
Matrix< General, Var, Var, AT > & | operator= (const Matrix< Type, Row, Col, AT > &A)
| Assignment operator. More...
template<class Type , class Row , class Col >
Matrix< General, Var, Var, AT > & | operator<<= (const Matrix< Type, Row, Col, AT > &A)
| Matrix assignment. More...
Matrix< General, Var, Var, AT > & | operator<<= (Matrix< General, Var, Var, AT > &&src)
template<class AT2 >
| operator Matrix< General, Var, Var, AT2 > () const
AT & | operator() (int i, int j)
| Element operator. 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
| Element operator. More...
AT & | e (int i)
const AT & | e (int i) const
| Element operator. More...
AT * | operator() ()
| Pointer operator. More...
const AT * | operator() () const
| Pointer operator. 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_TRANSPOSE | blasTrans () const
| Transposed status. More...
const CBLAS_ORDER | blasOrder () const
| Storage convention. More...
const Matrix< General, Var, Var, AT > | operator() (const Range< Var, Var > &I, const Range< Var, Var > &J) const
| Submatrix operator. More...
template<int M1, int M2, int N1, int N2>
const Matrix< General, Fixed< M2-M1+1 >, Fixed< N2-N1+1 >, AT > | operator() (const Range< Fixed< M1 >, Fixed< M2 >> &I, const Range< Fixed< N1 >, Fixed< N2 >> &J) const
template<int M1, int M2>
const Matrix< General, Fixed< M2-M1+1 >, Var, AT > | operator() (const Range< Fixed< M1 >, Fixed< M2 >> &I, const Range< Var, Var > &J) const
template<int N1, int N2>
const Matrix< General, Var, Fixed< N2-N1+1 >, AT > | operator() (const Range< Var, Var > &I, const Range< Fixed< N1 >, Fixed< N2 >> &J) const
const RowVector< Var, AT > | row (int i) const
const Vector< Var, AT > | col (int j) const
Matrix< General, Var, Var, AT > & | init (const AT &val=AT())
| Initialization. More...
Matrix< General, Var, Var, AT > & | init (Init all, const AT &a=AT())
Matrix< General, Var, Var, AT > & | init (Eye eye, const AT &val=1)
Matrix< General, Var, Var, 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...
const Matrix< General, Var, Var, AT > | T () const
| Cast to AT. More...
template<class Row >
void | set (int j, const Vector< Row, AT > &x)
template<class Col >
void | set (int i, const RowVector< Col, AT > &x)
template<class Type , class Row , class Col >
void | set (const Range< Var, Var > &I, const Range< Var, Var > &J, const Matrix< Type, Row, Col, AT > &A)
template<class Row >
void | add (int j, const Vector< Row, AT > &x)
template<class Col >
void | add (int i, const RowVector< Col, AT > &x)
template<class Type , class Row , class Col >
void | add (const Range< Var, Var > &I, const Range< Var, Var > &J, const Matrix< Type, Row, Col, AT > &A)
const Matrix< General, Var, Var, AT > | operator() (const Indices &I, const Indices &J) const
const Matrix< General, Var, Var, AT > | operator() (const Range< Var, Var > &I, const Indices &J) const
const Matrix< General, Var, Var, AT > | operator() (const Indices &I, const Range< Var, Var > &J) const
template<class Row >
void | set (const Indices &I, int j, const Vector< Row, AT > &x)
template<class Type , class Row , class Col >
void | set (const Indices &I, const Indices &J, const Matrix< Type, Row, Col, AT > &A)
template<class Type , class Row , class Col >
void | set (const Range< Var, Var > &I, const Indices &J, const Matrix< Type, Row, Col, AT > &A)
template<class Type , class Row , class Col >
void | set (const Indices &I, const Range< Var, Var > &J, const Matrix< Type, Row, Col, AT > &A)

## Static Public Attributes

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

## 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/5]

template<class AT >

fmatvec::SquareMatrix< Var, AT >::SquareMatrix | ( |  | ) |

inline explicit

Standard constructor.

Constructs a squarematrix with no size.

## ◆ SquareMatrix() [2/5]

template<class AT >

fmatvec::SquareMatrix< Var, AT >::SquareMatrix | ( | const SquareMatrix< Var, AT > & | A | ) |

inline

Copy Constructor.

See SquareMatrix(const SquareMatrix<AT>&)

## ◆ SquareMatrix() [3/5]

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/5]

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

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

inline explicit

Copy Constructor.

See SquareMatrix(const SquareMatrix<AT>&)

## ◆ SquareMatrix() [5/5]

template<class AT >

fmatvec::SquareMatrix< Var, AT >::SquareMatrix | ( | 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 ro, UseExceptions<AT>::EXw.

Parameters

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

## Member Function Documentation

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

template<class AT >

fmatvec::SquareMatrix< Var, 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<<=()

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

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

  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 >

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

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

- /mbsim-env/fmatvec/fmatvec/var_square_matrix.h