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

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

#include <core.hpp>

Public Member Functions

 MatViewCols (const Mat< T, n_rows, n_cols, matType< type_parent >()> &m)
 Construct a new MatViewCols object from raw data pointer.
 
 MatViewCols (const MatViewCols &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_rows, last_col - first_col+1, MatType::NORMAL > () const
 Conversion from view to a real Mat.
 
Mat< T, n_rows, last_col - first_col+1, 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<size_t first_col, size_t last_col, typename T, size_t n_rows, size_t n_cols, MatType type, typename type_parent>
class flames::MatViewCols< first_col, last_col, T, n_rows, n_cols, type, type_parent >

Read only view version of successive columns.

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

Constructor & Destructor Documentation

◆ MatViewCols() [1/2]

template<size_t first_col, size_t last_col, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
flames::MatViewCols< first_col, last_col, T, n_rows, n_cols, type, type_parent >::MatViewCols ( const Mat< T, n_rows, n_cols, matType< type_parent >()> & m)
inline

Construct a new MatViewCols object from raw data pointer.

Parameters
mThe original matrix.

◆ MatViewCols() [2/2]

template<size_t first_col, size_t last_col, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
flames::MatViewCols< first_col, last_col, T, n_rows, n_cols, type, type_parent >::MatViewCols ( const MatViewCols< first_col, last_col, T, n_rows, n_cols, type, type_parent > & m)
inline

Copy constructor.

Parameters
mAnother MatViewCols object.

Member Function Documentation

◆ asMat()

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

Explicitly make a Mat copy.

Returns
(Mat<T, n_rows, last_col - first_col + 1, MatType::NORMAL>) The real Mat.

◆ operator Mat< T, n_rows, last_col - first_col+1, MatType::NORMAL >()

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

Conversion from view to a real Mat.

Returns
(Mat<T, n_rows, last_col - first_col + 1, MatType::NORMAL>) The real Mat.

◆ operator()()

template<size_t first_col, size_t last_col, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
T flames::MatViewCols< first_col, last_col, 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_col, size_t last_col, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
T flames::MatViewCols< first_col, last_col, 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_col, size_t last_col, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
static constexpr MatType flames::MatViewCols< first_col, last_col, T, n_rows, 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<size_t first_col, size_t last_col, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
static constexpr size_t flames::MatViewCols< first_col, last_col, 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_col, size_t last_col, typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
const T* flames::MatViewCols< first_col, last_col, 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: