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

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

#include <core.hpp>

Public Member Functions

 MatViewOffDiag (const Mat< T, N, N, matType< type_parent >()> &m)
 Construct a new MatViewOffDiag object from raw data pointer.
 
 MatViewOffDiag (const MatViewOffDiag &m)
 Copy constructor.
 
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::NORMAL > () const
 Conversion from view to a real Mat.
 
Mat< T, N, N, MatType::NORMALasMat () 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::MatViewOffDiag< T, N, N_, type, type_parent >

Read only view version of a off diagonal.

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 off diagonal) type.

Constructor & Destructor Documentation

◆ MatViewOffDiag() [1/2]

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

Construct a new MatViewOffDiag object from raw data pointer.

Parameters
mThe original matrix.

◆ MatViewOffDiag() [2/2]

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

Copy constructor.

Parameters
mAnother MatViewOffDiag object.

Member Function Documentation

◆ asMat()

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

Explicitly make a Mat copy.

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

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

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

Conversion from view to a real Mat.

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

◆ operator()()

template<typename T , size_t N, size_t N_, MatType type, typename type_parent >
T flames::MatViewOffDiag< 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::MatViewOffDiag< 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::MatViewOffDiag< 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::MatViewOffDiag< 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::MatViewOffDiag< 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: