0.4.1
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 (std::span< const 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 (std::span< const 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 >
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 RowKeyType_, int Rows_>
class KeyedVectorBase
 

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

Definition at line 73 of file KeyedMatrix.hpp.

Member Function Documentation

◆ hasAnyRows()

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

Checks if the matrix has any key.

Parameters
keysRow keys to check for

Definition at line 95 of file KeyedMatrix.hpp.

◆ 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

Definition at line 84 of file KeyedMatrix.hpp.

◆ hasRows()

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

Checks if the matrix has multiple keys.

Parameters
keysRow keys to check for

Definition at line 88 of file KeyedMatrix.hpp.

◆ 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

Definition at line 103 of file KeyedMatrix.hpp.

◆ rowKeys()

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

Returns the row keys.

Definition at line 80 of file KeyedMatrix.hpp.

◆ rows()

template<typename Scalar, typename RowKeyType, int Rows, int Cols>
decltype(auto) NAV::internal::KeyedMatrixRowsBase< Scalar, RowKeyType, Rows, Cols >::rows ( ) const
inlinenodiscard

Return the rows of the underlying Eigen matrix.

Definition at line 77 of file KeyedMatrix.hpp.

Friends And Related Symbol Documentation

◆ KeyedMatrixBase

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

Definition at line 124 of file KeyedMatrix.hpp.

◆ KeyedVectorBase

template<typename Scalar, typename RowKeyType, int Rows, int Cols>
template<typename Scalar_, typename RowKeyType_, int Rows_>
friend class KeyedVectorBase
friend

Definition at line 126 of file KeyedMatrix.hpp.

Field Documentation

◆ rowIndices

template<typename Scalar, typename RowKeyType, int Rows, int Cols>
unordered_map<RowKeyType, Eigen::Index> NAV::internal::KeyedMatrixRowsBase< Scalar, RowKeyType, Rows, Cols >::rowIndices
protected

RowKey to Row Index mapping.

Definition at line 115 of file KeyedMatrix.hpp.

◆ rowKeysVector

template<typename Scalar, typename RowKeyType, int Rows, int Cols>
std::vector<RowKeyType> NAV::internal::KeyedMatrixRowsBase< Scalar, RowKeyType, Rows, Cols >::rowKeysVector
protected

Row Keys.

Definition at line 117 of file KeyedMatrix.hpp.

◆ rowSlice

template<typename Scalar, typename RowKeyType, int Rows, int Cols>
std::vector<Eigen::Index> NAV::internal::KeyedMatrixRowsBase< Scalar, RowKeyType, Rows, Cols >::rowSlice
mutableprotected

Row Slice used for accessing.

Definition at line 120 of file KeyedMatrix.hpp.


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