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

#include <core.hpp>

Public Member Functions

 MatRefCol (Mat< T, n_rows, n_cols, matType< type_parent >()> &m, size_t index)
 Construct a new MatRefCol object from raw data pointer.
 
 MatRefCol (const MatRefCol &m)
 Copy constructor.
 
template<typename T_ , size_t n_rows_, size_t n_cols_, MatType type_>
MatRefColoperator= (const Mat< T_, n_rows_, n_cols_, type_ > &m)
 
template<typename M >
void assign (M m)
 
operator() (size_t r, size_t c) const
 Get the read only data element from row and column index.
 
T & operator() (size_t r, size_t c)
 
operator[] (size_t index) const
 Get the read only element by array row major index.
 
T & operator[] (size_t index)
 
 operator Vec< T, n_rows > () const
 Conversion from view to a real Mat.
 
Vec< T, n_rows > asMat () const
 Explicitly make a Mat copy.
 
Vec< T, n_rows > asVec () const
 Explicitly make a Mat (Vec) copy.
 
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.
 
static constexpr MatType pType () noexcept
 Parent matrix as MatType.
 

Public Attributes

T *const _data
 Raw data pointer.
 

Constructor & Destructor Documentation

◆ MatRefCol() [1/2]

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

Construct a new MatRefCol object from raw data pointer.

Parameters
mThe original matrix.

◆ MatRefCol() [2/2]

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

Copy constructor.

Parameters
mAnother MatRefCol object.

Member Function Documentation

◆ asMat()

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

Explicitly make a Mat copy.

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

◆ assign()

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
template<typename M >
void flames::MatRefCol< T, n_rows, n_cols, type, type_parent >::assign ( M m)
inline
Here is the call graph for this function:

◆ asVec()

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

Explicitly make a Mat (Vec) copy.

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

◆ operator Vec< T, n_rows >()

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

Conversion from view to a real Mat.

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

◆ operator()() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
T & flames::MatRefCol< T, n_rows, n_cols, type, type_parent >::operator() ( size_t r,
size_t c )
inline
Here is the call graph for this function:

◆ operator()() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
T flames::MatRefCol< 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 >
template<typename T_ , size_t n_rows_, size_t n_cols_, MatType type_>
MatRefCol & flames::MatRefCol< T, n_rows, n_cols, type, type_parent >::operator= ( const Mat< T_, n_rows_, n_cols_, type_ > & m)
inline
Here is the call graph for this function:

◆ operator[]() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
T & flames::MatRefCol< T, n_rows, n_cols, type, type_parent >::operator[] ( size_t index)
inline

◆ operator[]() [2/2]

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

The data element number.

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

Member Data Documentation

◆ _data

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