![]() |
0.4.1
|
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. | |
![]() | |
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 |
Base class for Keyed matrices with multiple rows.
Scalar | Numeric type, e.g. float, double, int or std::complex<float>. |
RowKeyType | Type of the key used for row lookup |
Rows | Number of rows, or Dynamic |
Cols | Number of columns, or Dynamic |
Definition at line 73 of file KeyedMatrix.hpp.
|
inline |
Checks if the matrix has any key.
keys | Row keys to check for |
Definition at line 95 of file KeyedMatrix.hpp.
|
inline |
Checks if the matrix has the key.
key | Row key to check for |
Definition at line 84 of file KeyedMatrix.hpp.
|
inline |
Checks if the matrix has multiple keys.
keys | Row keys to check for |
Definition at line 88 of file KeyedMatrix.hpp.
|
inline |
Replace the old with the new key.
[in] | oldKey | Old key to replace |
[in] | newKey | New key to use instead |
Definition at line 103 of file KeyedMatrix.hpp.
|
inline |
Returns the row keys.
Definition at line 80 of file KeyedMatrix.hpp.
|
inlinenodiscard |
Return the rows of the underlying Eigen matrix.
Definition at line 77 of file KeyedMatrix.hpp.
|
friend |
Definition at line 124 of file KeyedMatrix.hpp.
|
friend |
Definition at line 126 of file KeyedMatrix.hpp.
|
protected |
RowKey to Row Index mapping.
Definition at line 115 of file KeyedMatrix.hpp.
|
protected |
Row Keys.
Definition at line 117 of file KeyedMatrix.hpp.
|
mutableprotected |
Row Slice used for accessing.
Definition at line 120 of file KeyedMatrix.hpp.