0.2.0
Loading...
Searching...
No Matches
NAV::internal::KeyedMatrixRowsBase< Scalar, RowKeyType, Rows, Cols > Class Template Reference

Base class for Keyed matrices with multiple rows. More...

Public Member Functions

bool hasAnyRows (const std::vector< RowKeyType > &keys) const
 Checks if the matrix has any key.
 
bool hasRow (const RowKeyType &key) const
 Checks if the matrix has the key.
 
bool hasRows (const std::vector< RowKeyType > &keys) const
 Checks if the matrix has multiple keys.
 
void replaceRowKey (const RowKeyType &oldKey, const RowKeyType &newKey)
 Replace the old with the new key.
 
const std::vector< RowKeyType > & rowKeys () const
 Returns the row keys.
 
decltype(auto) rows () const
 Return the rows of the underlying Eigen matrix.
 

Protected Attributes

unordered_map< RowKeyType, Eigen::Index > rowIndices
 RowKey to Row Index mapping.
 
std::vector< RowKeyType > rowKeysVector
 Row Keys.
 
std::vector< Eigen::Index > rowSlice
 Row Slice used for accessing.
 
- Protected Attributes inherited from NAV::internal::KeyedMatrixStorage< Scalar, Rows, Cols >
Eigen::Matrix< Scalar, Rows, Cols > matrix
 Data storage of the type.
 

Detailed Description

template<typename Scalar, typename RowKeyType, int Rows, int Cols>
class NAV::internal::KeyedMatrixRowsBase< Scalar, RowKeyType, Rows, Cols >

Base class for Keyed matrices with multiple rows.

Template Parameters
ScalarNumeric type, e.g. float, double, int or std::complex<float>.
RowKeyTypeType of the key used for row lookup
RowsNumber of rows, or Dynamic
ColsNumber of columns, or Dynamic

Member Function Documentation

◆ hasAnyRows()

template<typename Scalar , typename RowKeyType , int Rows, int Cols>
bool NAV::internal::KeyedMatrixRowsBase< Scalar, RowKeyType, Rows, Cols >::hasAnyRows ( const std::vector< RowKeyType > & keys) const
inline

Checks if the matrix has any key.

Parameters
keysRow keys to check for

◆ hasRow()

template<typename Scalar , typename RowKeyType , int Rows, int Cols>
bool NAV::internal::KeyedMatrixRowsBase< Scalar, RowKeyType, Rows, Cols >::hasRow ( const RowKeyType & key) const
inline

Checks if the matrix has the key.

Parameters
keyRow key to check for

◆ hasRows()

template<typename Scalar , typename RowKeyType , int Rows, int Cols>
bool NAV::internal::KeyedMatrixRowsBase< Scalar, RowKeyType, Rows, Cols >::hasRows ( const std::vector< RowKeyType > & keys) const
inline

Checks if the matrix has multiple keys.

Parameters
keysRow keys to check for

◆ replaceRowKey()

template<typename Scalar , typename RowKeyType , int Rows, int Cols>
void NAV::internal::KeyedMatrixRowsBase< Scalar, RowKeyType, Rows, Cols >::replaceRowKey ( const RowKeyType & oldKey,
const RowKeyType & newKey )
inline

Replace the old with the new key.

Parameters
[in]oldKeyOld key to replace
[in]newKeyNew key to use instead

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