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

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

#include <core.hpp>

Public Member Functions

 MatViewDiagVec (const Mat< T, N, N, matType< type_parent >()> &m)
 Construct a new MatViewDiagVec object from raw data pointer.
 
 MatViewDiagVec (const MatViewDiagVec &m)
 Copy constructor.
 
Vec< T, N > inv () 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 Vec< T, N > () const
 Conversion from view to a real Mat.
 
Vec< T, N > asMat () const
 Explicitly make a Mat copy.
 
Vec< T, N > asVec () const
 Explicitly make a Mat (Vec) 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_cols, MatType type, typename type_parent>
class flames::MatViewDiagVec< T, N, n_cols, type, type_parent >

Read only view version of a diagonal matrix as vector.

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

Constructor & Destructor Documentation

◆ MatViewDiagVec() [1/2]

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

Construct a new MatViewDiagVec object from raw data pointer.

Parameters
mThe original matrix.

◆ MatViewDiagVec() [2/2]

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

Copy constructor.

Parameters
mAnother MatViewDiagVec object.

Member Function Documentation

◆ asMat()

template<typename T , size_t N, size_t n_cols, MatType type, typename type_parent >
Vec< T, N > flames::MatViewDiagVec< T, N, n_cols, type, type_parent >::asMat ( ) const
inline

Explicitly make a Mat copy.

Returns
(Vec<T, N>) The real Mat.

◆ asVec()

template<typename T , size_t N, size_t n_cols, MatType type, typename type_parent >
Vec< T, N > flames::MatViewDiagVec< T, N, n_cols, type, type_parent >::asVec ( ) const
inline

Explicitly make a Mat (Vec) copy.

Returns
(Vec<T, N>) The real Mat.

◆ inv()

template<typename T , size_t N, size_t n_cols, MatType type, typename type_parent >
Vec< T, N > flames::MatViewDiagVec< T, N, n_cols, type, type_parent >::inv ( ) const
inline

Return a inverse matrix.

Returns
(Vec<T, N>) The inversed matrix.

◆ operator Vec< T, N >()

template<typename T , size_t N, size_t n_cols, MatType type, typename type_parent >
flames::MatViewDiagVec< T, N, n_cols, type, type_parent >::operator Vec< T, N > ( ) const
inline

Conversion from view to a real Mat.

Returns
(Vec<T, N>) The real Mat.

◆ operator()()

template<typename T , size_t N, size_t n_cols, MatType type, typename type_parent >
T flames::MatViewDiagVec< T, N, n_cols, 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_cols, MatType type, typename type_parent >
T flames::MatViewDiagVec< T, N, n_cols, 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_cols, MatType type, typename type_parent >
static constexpr MatType flames::MatViewDiagVec< T, N, n_cols, 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_cols, MatType type, typename type_parent >
static constexpr size_t flames::MatViewDiagVec< T, N, n_cols, 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_cols, MatType type, typename type_parent >
const T* flames::MatViewDiagVec< T, N, n_cols, 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: