FLAMES 0.1.0
Matrix-Empowered HLS Library
Loading...
Searching...
No Matches
flames::MatViewDiagMat< T, N, N_, type, type_parent > Class Template Reference

Read only view version of a diagonal matrix. More...

#include <core.hpp>

Public Member Functions

 MatViewDiagMat (const Mat< T, N, N, matType< type_parent >()> &m)
 Construct a new MatViewDiagMat object from a raw data pointer.
 
 MatViewDiagMat (const MatViewDiagMat &m)
 Copy constructor.
 
Mat< T, N, N, MatType::DIAGONALinv () const
 Return a inverse matrix.
 
operator() (size_t r, size_t c) const
 Get the read only data element from row and column index.
 
operator[] (size_t index) const
 Get the read only element by array row major index.
 
 operator Mat< T, N, N, MatType::DIAGONAL > () const
 Conversion from view to a real Mat.
 
Mat< T, N, N, MatType::DIAGONALasMat () const
 Explicitly make a Mat copy.
 

Static Public Member Functions

static constexpr size_t size () noexcept
 The data element number.
 
static constexpr MatType pType () noexcept
 Parent matrix as MatType.
 

Public Attributes

const T * _data
 Raw data pointer.
 

Detailed Description

template<typename T, size_t N, size_t N_, MatType type, typename type_parent>
class flames::MatViewDiagMat< T, N, N_, type, type_parent >

Read only view version of a diagonal matrix.

Template Parameters
TElement type.
NMatrix dimension.
N_Matrix dimension (unused, only to ensure it is a square matrix).
typeMatrix type (surely DIAGONAL here).
type_parentParent matrix (where it takes the diagonal) type.

Constructor & Destructor Documentation

◆ MatViewDiagMat() [1/2]

template<typename T , size_t N, size_t N_, MatType type, typename type_parent >
flames::MatViewDiagMat< T, N, N_, type, type_parent >::MatViewDiagMat ( const Mat< T, N, N, matType< type_parent >()> & m)
inline

Construct a new MatViewDiagMat object from a raw data pointer.

Parameters
mThe original matrix.

◆ MatViewDiagMat() [2/2]

template<typename T , size_t N, size_t N_, MatType type, typename type_parent >
flames::MatViewDiagMat< T, N, N_, type, type_parent >::MatViewDiagMat ( const MatViewDiagMat< T, N, N_, type, type_parent > & m)
inline

Copy constructor.

Parameters
mAnother MatViewDiagMat object.

Member Function Documentation

◆ asMat()

template<typename T , size_t N, size_t N_, MatType type, typename type_parent >
Mat< T, N, N, MatType::DIAGONAL > flames::MatViewDiagMat< T, N, N_, type, type_parent >::asMat ( ) const
inline

Explicitly make a Mat copy.

Returns
(Mat<T, N, N, MatType::DIAGONAL>) The real Mat.

◆ inv()

template<typename T , size_t N, size_t N_, MatType type, typename type_parent >
Mat< T, N, N, MatType::DIAGONAL > flames::MatViewDiagMat< T, N, N_, type, type_parent >::inv ( ) const
inline

Return a inverse matrix.

Returns
(Mat<T, N, N, MatType::DIAGONAL>) The inversed matrix.

◆ operator Mat< T, N, N, MatType::DIAGONAL >()

template<typename T , size_t N, size_t N_, MatType type, typename type_parent >
flames::MatViewDiagMat< T, N, N_, type, type_parent >::operator Mat< T, N, N, MatType::DIAGONAL > ( ) const
inline

Conversion from view to a real Mat.

Returns
(Mat<T, N, N, MatType::DIAGONAL>) The real Mat.
Here is the call graph for this function:

◆ operator()()

template<typename T , size_t N, size_t N_, MatType type, typename type_parent >
T flames::MatViewDiagMat< T, N, N_, type, type_parent >::operator() ( size_t r,
size_t c ) const
inline

Get the read only data element from row and column index.

Parameters
rThe row index.
cThe column index.
Returns
(T) The element value.
Here is the call graph for this function:

◆ operator[]()

template<typename T , size_t N, size_t N_, MatType type, typename type_parent >
T flames::MatViewDiagMat< T, N, N_, type, type_parent >::operator[] ( size_t index) const
inline

Get the read only element by array row major index.

Parameters
indexThe index.
Returns
(T) The data.

◆ pType()

template<typename T , size_t N, size_t N_, MatType type, typename type_parent >
static constexpr MatType flames::MatViewDiagMat< T, N, N_, type, type_parent >::pType ( )
inlinestaticconstexprnoexcept

Parent matrix as MatType.

Returns
(constexpr MatType) The MatType.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ size()

template<typename T , size_t N, size_t N_, MatType type, typename type_parent >
static constexpr size_t flames::MatViewDiagMat< T, N, N_, type, type_parent >::size ( )
inlinestaticconstexprnoexcept

The data element number.

Returns
(constexpr size_t) The size.

Member Data Documentation

◆ _data

template<typename T , size_t N, size_t N_, MatType type, typename type_parent >
const T* flames::MatViewDiagMat< T, N, N_, type, type_parent >::_data

Raw data pointer.

Note
This contents will not be modified.

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