WaveBlocksND
Public Types | Public Member Functions | Private Types | Private Attributes | Static Private Attributes | List of all members
waveblocks::utilities::MatrixToGrid< Matrix > Class Template Reference

Adaptor which accepts an Eigen::Matrix and emulates some behavior of a std::vector. More...

#include <adaptors.hpp>

Public Types

template<class I >
using type = MatrixToGrid< Matrix >
 

Public Member Functions

size_t size () const
 
 MatrixToGrid (const Matrix &matrix)
 
grid_element_type operator[] (int i) const
 
MatrixToGridIterator< Matrix > begin () const
 
MatrixToGridIterator< Matrix > end () const
 

Private Types

using grid_element_type = GVector< typename Matrix::Scalar, N >
 

Private Attributes

const Matrix & matrix
 

Static Private Attributes

static const int N = Matrix::RowsAtCompileTime
 
static const int M = Matrix::ColsAtCompileTime
 

Detailed Description

template<class Matrix>
class waveblocks::utilities::MatrixToGrid< Matrix >

Adaptor which accepts an Eigen::Matrix and emulates some behavior of a std::vector.

In particular allows to use for:in loops to iterate over each column of the matrix as well as random accesses to each column.

Template Parameters
MatrixEigen::Matrix to which to adapt

Member Typedef Documentation

template<class Matrix>
using waveblocks::utilities::MatrixToGrid< Matrix >::grid_element_type = GVector<typename Matrix::Scalar, N>
private
template<class Matrix>
template<class I >
using waveblocks::utilities::MatrixToGrid< Matrix >::type = MatrixToGrid<Matrix>

Constructor & Destructor Documentation

template<class Matrix>
waveblocks::utilities::MatrixToGrid< Matrix >::MatrixToGrid ( const Matrix &  matrix)
inline

Member Function Documentation

template<class Matrix>
MatrixToGridIterator<Matrix> waveblocks::utilities::MatrixToGrid< Matrix >::begin ( ) const
inline
template<class Matrix>
MatrixToGridIterator<Matrix> waveblocks::utilities::MatrixToGrid< Matrix >::end ( ) const
inline
template<class Matrix>
grid_element_type waveblocks::utilities::MatrixToGrid< Matrix >::operator[] ( int  i) const
inline
template<class Matrix>
size_t waveblocks::utilities::MatrixToGrid< Matrix >::size ( ) const
inline

Member Data Documentation

template<class Matrix>
const int waveblocks::utilities::MatrixToGrid< Matrix >::M = Matrix::ColsAtCompileTime
staticprivate
template<class Matrix>
const Matrix& waveblocks::utilities::MatrixToGrid< Matrix >::matrix
private
template<class Matrix>
const int waveblocks::utilities::MatrixToGrid< Matrix >::N = Matrix::RowsAtCompileTime
staticprivate

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