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

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

Public Member Functions

const std::vector< ColKeyType > & colKeys () const
 Returns the col keys.
 
decltype(auto) cols () const
 Return the cols of the underlying Eigen matrix.
 
bool hasAnyCols (const std::vector< ColKeyType > &keys) const
 Checks if the matrix has any keys.
 
bool hasCol (const ColKeyType &key) const
 Checks if the matrix has the key.
 
bool hasCols (const std::vector< ColKeyType > &keys) const
 Checks if the matrix has multiple keys.
 
void replaceColKey (const ColKeyType &oldKey, const ColKeyType &newKey)
 Replace the old with the new key.
 

Protected Attributes

unordered_map< ColKeyType, Eigen::Index > colIndices
 ColKey to Col Index mapping.
 
std::vector< ColKeyType > colKeysVector
 Col Keys.
 
std::vector< Eigen::Index > colSlice
 Col 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 ColKeyType, int Rows, int Cols>
class NAV::internal::KeyedMatrixColsBase< Scalar, ColKeyType, Rows, Cols >

Base class for Keyed matrices with multiple columns.

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

Member Function Documentation

◆ hasAnyCols()

template<typename Scalar , typename ColKeyType , int Rows, int Cols>
bool NAV::internal::KeyedMatrixColsBase< Scalar, ColKeyType, Rows, Cols >::hasAnyCols ( const std::vector< ColKeyType > & keys) const
inline

Checks if the matrix has any keys.

Parameters
keysCol keys to check for

◆ hasCol()

template<typename Scalar , typename ColKeyType , int Rows, int Cols>
bool NAV::internal::KeyedMatrixColsBase< Scalar, ColKeyType, Rows, Cols >::hasCol ( const ColKeyType & key) const
inline

Checks if the matrix has the key.

Parameters
keyCol key to check for

◆ hasCols()

template<typename Scalar , typename ColKeyType , int Rows, int Cols>
bool NAV::internal::KeyedMatrixColsBase< Scalar, ColKeyType, Rows, Cols >::hasCols ( const std::vector< ColKeyType > & keys) const
inline

Checks if the matrix has multiple keys.

Parameters
keysCol keys to check for

◆ replaceColKey()

template<typename Scalar , typename ColKeyType , int Rows, int Cols>
void NAV::internal::KeyedMatrixColsBase< Scalar, ColKeyType, Rows, Cols >::replaceColKey ( const ColKeyType & oldKey,
const ColKeyType & 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: