FLAMES 0.1.0
Matrix-Empowered HLS Library
flames::MatViewRow< T, n_rows, n_cols, type, type_parent > Class Template Reference

Read only view version of a certain row as row vector. More...

#include <core.hpp>

Public Member Functions

 MatViewRow (const Mat< T, n_rows, n_cols, matType< type_parent >()> &m, size_t index)
 Construct a new MatViewRow object from raw data pointer. More...
 
 MatViewRow (const MatViewRow &m)
 Copy constructor. More...
 
operator() (size_t r, size_t c) const
 Get the read only data element from row and column index. More...
 
operator[] (size_t index) const
 Get the read only element by array row major index. More...
 
 operator RowVec< T, n_rows > () const
 Conversion from view to a real Mat. More...
 
RowVec< T, n_cols > asMat () const
 Explicitly make a Mat copy. More...
 
Vec< T, n_rows > asRowVec () const
 Explicitly make a Mat (RowVec) copy. More...
 
void print (const std::string &str="", std::ostream &os=std::cout) const
 

Static Public Member Functions

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

Public Attributes

const T *const _data
 Raw data pointer. More...
 

Detailed Description

template<typename T, size_t n_rows, size_t n_cols, MatType type, typename type_parent>
class flames::MatViewRow< T, n_rows, n_cols, type, type_parent >

Read only view version of a certain row as row vector.

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 vector) type.

Constructor & Destructor Documentation

◆ MatViewRow() [1/2]

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

Construct a new MatViewRow object from raw data pointer.

Parameters
mThe original matrix.

◆ MatViewRow() [2/2]

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

Copy constructor.

Parameters
mAnother MatViewRow object.

Member Function Documentation

◆ asMat()

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
RowVec< T, n_cols > flames::MatViewRow< T, n_rows, n_cols, type, type_parent >::asMat ( ) const
inline

Explicitly make a Mat copy.

Returns
(RowVec<T, n_cols>) The real Mat.
Here is the caller graph for this function:

◆ asRowVec()

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
Vec< T, n_rows > flames::MatViewRow< T, n_rows, n_cols, type, type_parent >::asRowVec ( ) const
inline

Explicitly make a Mat (RowVec) copy.

Returns
(RowVec<T, n_cols>) The real Mat.

◆ operator RowVec< T, n_rows >()

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
flames::MatViewRow< T, n_rows, n_cols, type, type_parent >::operator RowVec< T, n_rows > ( ) const
inline

Conversion from view to a real Mat.

Returns
(RowVec<T, n_cols>) The real Mat.

◆ operator()()

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
T flames::MatViewRow< 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<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
T flames::MatViewRow< 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.

◆ print()

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
void flames::MatViewRow< T, n_rows, n_cols, type, type_parent >::print ( const std::string &  str = "",
std::ostream &  os = std::cout 
) const
inline
Here is the call graph for this function:

◆ pType()

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
static constexpr MatType flames::MatViewRow< T, n_rows, n_cols, type, type_parent >::pType ( )
inlinestaticconstexprnoexcept

Parent matrix as MatType.

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

◆ size()

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