VISR  0.12.0
Versatile Interactive Scene Renderer
visr::efl::BasicMatrix< ElementType > Class Template Reference

#include <init_filter_matrix.hpp>

Inheritance diagram for visr::efl::BasicMatrix< ElementType >:
visr::pml::MatrixParameter< ElementType >

Public Member Functions

 BasicMatrix (std::size_t alignmentElements=0)
 
 BasicMatrix (std::size_t numberOfRows, std::size_t numberOfColumns, std::size_t alignmentElements=0)
 
 BasicMatrix (std::size_t numberOfRows, std::size_t numberOfColumns, std::initializer_list< std::initializer_list< ElementType > > const &initialValues, std::size_t alignmentElements=0)
 
 BasicMatrix (BasicMatrix< ElementType > &&rhs)=default
 
BasicMatrix< ElementType > & operator= (BasicMatrix< ElementType > &&rhs)=default
 
 ~BasicMatrix ()
 
void resize (std::size_t newNumberOfRows, std::size_t newNumberOfColumns)
 
void zeroFill ()
 
void fillValue (ElementType val)
 
void swap (BasicMatrix< ElementType > &rhs)
 
void copy (BasicMatrix< ElementType > const &rhs)
 
std::size_t alignmentElements () const
 
std::size_t stride () const
 
std::size_t numberOfRows () const
 
std::size_t numberOfColumns () const
 
ElementType & operator() (std::size_t rowIdx, std::size_t colIdx)
 
ElementType const & operator() (std::size_t rowIdx, std::size_t colIdx) const
 
ElementType & at (std::size_t rowIdx, std::size_t colIdx)
 
ElementType const & at (std::size_t rowIdx, std::size_t colIdx) const
 
ElementType * data ()
 
ElementType const * data () const
 
ElementType * row (std::size_t rowIdx)
 
ElementType const * row (std::size_t rowIdx) const
 
void setRow (std::size_t rowIdx, ElementType const *values)
 
void setColumn (std::size_t colIdx, ElementType const *values)
 

Detailed Description

template<typename ElementType>
class visr::efl::BasicMatrix< ElementType >

Basic numeric matrix type with comprehensive access functions, but little arithmetic functionality. Such operations should be added as free functions.

Constructor & Destructor Documentation

◆ BasicMatrix() [1/4]

template<typename ElementType>
visr::efl::BasicMatrix< ElementType >::BasicMatrix ( std::size_t  alignmentElements = 0)
inlineexplicit

◆ BasicMatrix() [2/4]

template<typename ElementType>
visr::efl::BasicMatrix< ElementType >::BasicMatrix ( std::size_t  numberOfRows,
std::size_t  numberOfColumns,
std::size_t  alignmentElements = 0 
)
inlineexplicit

◆ BasicMatrix() [3/4]

template<typename ElementType>
visr::efl::BasicMatrix< ElementType >::BasicMatrix ( std::size_t  numberOfRows,
std::size_t  numberOfColumns,
std::initializer_list< std::initializer_list< ElementType > > const &  initialValues,
std::size_t  alignmentElements = 0 
)
inlineexplicit

◆ BasicMatrix() [4/4]

template<typename ElementType>
visr::efl::BasicMatrix< ElementType >::BasicMatrix ( BasicMatrix< ElementType > &&  rhs)
default

◆ ~BasicMatrix()

template<typename ElementType>
visr::efl::BasicMatrix< ElementType >::~BasicMatrix ( )
inline

Member Function Documentation

◆ alignmentElements()

template<typename ElementType>
std::size_t visr::efl::BasicMatrix< ElementType >::alignmentElements ( ) const
inline

◆ at() [1/2]

template<typename ElementType>
ElementType& visr::efl::BasicMatrix< ElementType >::at ( std::size_t  rowIdx,
std::size_t  colIdx 
)
inline

◆ at() [2/2]

template<typename ElementType>
ElementType const& visr::efl::BasicMatrix< ElementType >::at ( std::size_t  rowIdx,
std::size_t  colIdx 
) const
inline

◆ copy()

template<typename ElementType>
void visr::efl::BasicMatrix< ElementType >::copy ( BasicMatrix< ElementType > const &  rhs)
inline

Copy the content of matrix.

Parameters
rhsThe matrix to be copied.
Exceptions
std::invalid_argumentif the size of rhs does not match this matrix.

◆ data() [1/2]

template<typename ElementType>
ElementType* visr::efl::BasicMatrix< ElementType >::data ( )
inline

◆ data() [2/2]

template<typename ElementType>
ElementType const* visr::efl::BasicMatrix< ElementType >::data ( ) const
inline

◆ fillValue()

template<typename ElementType>
void visr::efl::BasicMatrix< ElementType >::fillValue ( ElementType  val)
inline

◆ numberOfColumns()

template<typename ElementType>
std::size_t visr::efl::BasicMatrix< ElementType >::numberOfColumns ( ) const
inline

◆ numberOfRows()

template<typename ElementType>
std::size_t visr::efl::BasicMatrix< ElementType >::numberOfRows ( ) const
inline

◆ operator()() [1/2]

template<typename ElementType>
ElementType& visr::efl::BasicMatrix< ElementType >::operator() ( std::size_t  rowIdx,
std::size_t  colIdx 
)
inline

◆ operator()() [2/2]

template<typename ElementType>
ElementType const& visr::efl::BasicMatrix< ElementType >::operator() ( std::size_t  rowIdx,
std::size_t  colIdx 
) const
inline

◆ operator=()

template<typename ElementType>
BasicMatrix<ElementType>& visr::efl::BasicMatrix< ElementType >::operator= ( BasicMatrix< ElementType > &&  rhs)
default

◆ resize()

template<typename ElementType>
void visr::efl::BasicMatrix< ElementType >::resize ( std::size_t  newNumberOfRows,
std::size_t  newNumberOfColumns 
)
inline

Reset the size of the matrix. All elements will be reset to zero.

Parameters
newNumberOfRowsThe new number of rows.
newNumberOfColumnsThe new number of columns.

◆ row() [1/2]

template<typename ElementType>
ElementType* visr::efl::BasicMatrix< ElementType >::row ( std::size_t  rowIdx)
inline

◆ row() [2/2]

template<typename ElementType>
ElementType const* visr::efl::BasicMatrix< ElementType >::row ( std::size_t  rowIdx) const
inline

◆ setColumn()

template<typename ElementType>
void visr::efl::BasicMatrix< ElementType >::setColumn ( std::size_t  colIdx,
ElementType const *  values 
)
inline

◆ setRow()

template<typename ElementType>
void visr::efl::BasicMatrix< ElementType >::setRow ( std::size_t  rowIdx,
ElementType const *  values 
)
inline

◆ stride()

template<typename ElementType>
std::size_t visr::efl::BasicMatrix< ElementType >::stride ( ) const
inline

◆ swap()

template<typename ElementType>
void visr::efl::BasicMatrix< ElementType >::swap ( BasicMatrix< ElementType > &  rhs)
inline

Swap the contents with a matrix of a consistent layout.

Parameters
rhsThe matrix to be swapped with.
Exceptions
std::logic_errorif the matrix layouts, i.e., number of rows or columns, stride or alignment, are inconsistent.

◆ zeroFill()

template<typename ElementType>
void visr::efl::BasicMatrix< ElementType >::zeroFill ( )
inline

The documentation for this class was generated from the following files: