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

Read only view version of successive rows. More...

#include <core.hpp>

Public Member Functions

 MatViewRows (const Mat< T, n_cols, n_rows, matType< type_parent >()> &m)
 Construct a new MatViewRows object from raw data pointer.
 
 MatViewRows (const MatViewRows &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, last_row - first_row+1, n_cols, MatType::NORMAL > () const
 Conversion from view to a real Mat.
 
Mat< T, last_row - first_row+1, n_cols, MatType::NORMALasMat () const
 Explicitly make a Mat copy.
 
Mat< T, last_row - first_row+1, n_cols, MatType::NORMALasVec () 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.last_col.
 

Public Attributes

const T * _data
 Raw data pointer.
 

Detailed Description

template<size_t first_row, size_t last_row, typename T, size_t n_rows, size_t n_cols, MatType type, typename type_parent>
class flames::MatViewRows< first_row, last_row, T, n_rows, n_cols, type, type_parent >

Read only view version of successive rows.

Template Parameters
TElement type.
n_rowsNumber of rows.
n_colsNumber of columns.
typeMatrix type (surely NORMAL here).
type_parentParent matrix (where it takes the row vectors) type.

Constructor & Destructor Documentation

◆ MatViewRows() [1/2]

template<size_t first_row, size_t last_row, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
flames::MatViewRows< first_row, last_row, T, n_rows, n_cols, type, type_parent >::MatViewRows ( const Mat< T, n_cols, n_rows, matType< type_parent >()> & m)
inline

Construct a new MatViewRows object from raw data pointer.

Parameters
mThe original matrix.

◆ MatViewRows() [2/2]

template<size_t first_row, size_t last_row, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
flames::MatViewRows< first_row, last_row, T, n_rows, n_cols, type, type_parent >::MatViewRows ( const MatViewRows< first_row, last_row, T, n_rows, n_cols, type, type_parent > & m)
inline

Copy constructor.

Parameters
mAnother MatViewRows object.

Member Function Documentation

◆ asMat()

template<size_t first_row, size_t last_row, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
Mat< T, last_row - first_row+1, n_cols, MatType::NORMAL > flames::MatViewRows< first_row, last_row, T, n_rows, n_cols, type, type_parent >::asMat ( ) const
inline

Explicitly make a Mat copy.

Returns
(Mat<T, last_row - first_row + 1, n_cols, MatType::NORMAL>)The real Mat.

◆ asVec()

template<size_t first_row, size_t last_row, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
Mat< T, last_row - first_row+1, n_cols, MatType::NORMAL > flames::MatViewRows< first_row, last_row, T, n_rows, n_cols, type, type_parent >::asVec ( ) const
inline

Explicitly make a Mat (Vec) copy.

Returns
(Mat<T, last_row - first_row + 1, n_cols, MatType::NORMAL>) The real Mat.

◆ operator Mat< T, last_row - first_row+1, n_cols, MatType::NORMAL >()

template<size_t first_row, size_t last_row, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
flames::MatViewRows< first_row, last_row, T, n_rows, n_cols, type, type_parent >::operator Mat< T, last_row - first_row+1, n_cols, MatType::NORMAL > ( ) const
inline

Conversion from view to a real Mat.

Returns
Mat<T, last_row - first_row, n_cols, MatType::NORMAL> The real Mat.

◆ operator()()

template<size_t first_row, size_t last_row, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
T flames::MatViewRows< first_row, last_row, T, n_rows, 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<size_t first_row, size_t last_row, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
T flames::MatViewRows< first_row, last_row, T, n_rows, 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<size_t first_row, size_t last_row, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
static constexpr MatType flames::MatViewRows< first_row, last_row, T, n_rows, n_cols, type, type_parent >::pType ( )
inlinestaticconstexprnoexcept

Parent matrix as MatType.last_col.

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

◆ size()

template<size_t first_row, size_t last_row, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
static constexpr size_t flames::MatViewRows< first_row, last_row, T, n_rows, n_cols, type, type_parent >::size ( )
inlinestaticconstexprnoexcept

The data element number.

Returns
(constexpr size_t) The size.

Member Data Documentation

◆ _data

template<size_t first_row, size_t last_row, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
const T* flames::MatViewRows< first_row, last_row, T, n_rows, 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: