SquareMatrixShape< FP > Class Template Reference

CPP API: mio::SquareMatrixShape< FP > Class Template Reference
mio::SquareMatrixShape< FP > Class Template Reference

shape of a square matrix. More...

#include <matrix_shape.h>

Public Types

using Matrix = Eigen::MatrixX< FP >
 

Public Member Functions

Eigen::Index cols () const
 number of columns. More...
 
bool operator!= (const SquareMatrixShape &other) const
 
bool operator== (const SquareMatrixShape &other) const
 equality comparators. More...
 
Eigen::Index rows () const
 number of rows. More...
 
template<class IOContext >
void serialize (IOContext &io) const
 serialize this. More...
 
Eigen::Index size () const
 number of rows or columns. More...
 
 SquareMatrixShape (Eigen::Index r)
 construct a square matrix of dimensions r More...
 

Static Public Member Functions

template<class IOContext >
static IOResult< SquareMatrixShapedeserialize (IOContext &io)
 deserialize an object of this class. More...
 
template<class ME >
static SquareMatrixShape get_shape_of (const Eigen::MatrixBase< ME > &m)
 extract the shape of a square matrix. More...
 

Private Attributes

Eigen::Index m_rows
 

Detailed Description

template<typename FP>
class mio::SquareMatrixShape< FP >

shape of a square matrix.

rows() == cols()

Member Typedef Documentation

◆ Matrix

template<typename FP >
using mio::SquareMatrixShape< FP >::Matrix = Eigen::MatrixX<FP>

Constructor & Destructor Documentation

◆ SquareMatrixShape()

template<typename FP >
mio::SquareMatrixShape< FP >::SquareMatrixShape ( Eigen::Index  r)
inlineexplicit

construct a square matrix of dimensions r

Parameters
rnumber of rows and columns

Member Function Documentation

◆ cols()

template<typename FP >
Eigen::Index mio::SquareMatrixShape< FP >::cols ( ) const
inline

number of columns.

equal to number of rows.

◆ deserialize()

template<typename FP >
template<class IOContext >
static IOResult<SquareMatrixShape> mio::SquareMatrixShape< FP >::deserialize ( IOContext &  io)
inlinestatic

deserialize an object of this class.

See also
mio::deserialize

◆ get_shape_of()

template<typename FP >
template<class ME >
static SquareMatrixShape mio::SquareMatrixShape< FP >::get_shape_of ( const Eigen::MatrixBase< ME > &  m)
inlinestatic

extract the shape of a square matrix.

Parameters
mmatrix to take the shape of.
Template Parameters
MEmatrix expression.

◆ operator!=()

template<typename FP >
bool mio::SquareMatrixShape< FP >::operator!= ( const SquareMatrixShape< FP > &  other) const
inline

◆ operator==()

template<typename FP >
bool mio::SquareMatrixShape< FP >::operator== ( const SquareMatrixShape< FP > &  other) const
inline

equality comparators.

◆ rows()

template<typename FP >
Eigen::Index mio::SquareMatrixShape< FP >::rows ( ) const
inline

number of rows.

equal to number of columns.

◆ serialize()

template<typename FP >
template<class IOContext >
void mio::SquareMatrixShape< FP >::serialize ( IOContext &  io) const
inline

serialize this.

See also
mio::serialize

◆ size()

template<typename FP >
Eigen::Index mio::SquareMatrixShape< FP >::size ( ) const
inline

number of rows or columns.

Member Data Documentation

◆ m_rows

template<typename FP >
Eigen::Index mio::SquareMatrixShape< FP >::m_rows
private