0.4.1
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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 (std::span< const 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 (std::span< const 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 >
std::mutex _sliceMutex
 Mutex for accessing the slices.
 
Eigen::Matrix< Scalar, Rows, Cols > matrix
 Data storage of the type.
 

Friends

template<typename Scalar_, typename RowKeyType_, typename ColKeyType_, int Rows_, int Cols_>
class KeyedMatrixBase
 
template<typename Scalar_, typename ColKeyType_, int Cols_>
class KeyedRowVectorBase
 

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

Definition at line 218 of file KeyedMatrix.hpp.

Member Function Documentation

◆ colKeys()

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

Returns the col keys.

Definition at line 225 of file KeyedMatrix.hpp.

◆ cols()

template<typename Scalar, typename ColKeyType, int Rows, int Cols>
decltype(auto) NAV::internal::KeyedMatrixColsBase< Scalar, ColKeyType, Rows, Cols >::cols ( ) const
inlinenodiscard

Return the cols of the underlying Eigen matrix.

Definition at line 222 of file KeyedMatrix.hpp.

◆ hasAnyCols()

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

Checks if the matrix has any keys.

Parameters
keysCol keys to check for

Definition at line 240 of file KeyedMatrix.hpp.

◆ 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

Definition at line 229 of file KeyedMatrix.hpp.

◆ hasCols()

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

Checks if the matrix has multiple keys.

Parameters
keysCol keys to check for

Definition at line 233 of file KeyedMatrix.hpp.

◆ 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

Definition at line 248 of file KeyedMatrix.hpp.

Friends And Related Symbol Documentation

◆ KeyedMatrixBase

template<typename Scalar, typename ColKeyType, int Rows, int Cols>
template<typename Scalar_, typename RowKeyType_, typename ColKeyType_, int Rows_, int Cols_>
friend class KeyedMatrixBase
friend

Definition at line 269 of file KeyedMatrix.hpp.

◆ KeyedRowVectorBase

template<typename Scalar, typename ColKeyType, int Rows, int Cols>
template<typename Scalar_, typename ColKeyType_, int Cols_>
friend class KeyedRowVectorBase
friend

Definition at line 271 of file KeyedMatrix.hpp.

Field Documentation

◆ colIndices

template<typename Scalar, typename ColKeyType, int Rows, int Cols>
unordered_map<ColKeyType, Eigen::Index> NAV::internal::KeyedMatrixColsBase< Scalar, ColKeyType, Rows, Cols >::colIndices
protected

ColKey to Col Index mapping.

Definition at line 260 of file KeyedMatrix.hpp.

◆ colKeysVector

template<typename Scalar, typename ColKeyType, int Rows, int Cols>
std::vector<ColKeyType> NAV::internal::KeyedMatrixColsBase< Scalar, ColKeyType, Rows, Cols >::colKeysVector
protected

Col Keys.

Definition at line 262 of file KeyedMatrix.hpp.

◆ colSlice

template<typename Scalar, typename ColKeyType, int Rows, int Cols>
std::vector<Eigen::Index> NAV::internal::KeyedMatrixColsBase< Scalar, ColKeyType, Rows, Cols >::colSlice
mutableprotected

Col Slice used for accessing.

Definition at line 265 of file KeyedMatrix.hpp.


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