0.5.0
Loading...
Searching...
No Matches
NAV::KeyedRowVector< Scalar, ColKeyType, Cols > Class Template Reference

Static sized KeyedRowVector. More...

Public Member Functions

template<typename Derived>
 KeyedRowVector (const Eigen::MatrixBase< Derived > &vector, std::span< const ColKeyType > colKeys)
 RowVector constructor.
 KeyedRowVector (const KeyedRowVector &other)
 Copy constructor.
 KeyedRowVector (const KeyedRowVector< Scalar, ColKeyType, Eigen::Dynamic > &other)
 Copy constructor.
 KeyedRowVector (KeyedRowVector &&other) noexcept
 Move constructor.
 KeyedRowVector (KeyedRowVector< Scalar, ColKeyType, Eigen::Dynamic > &&other) noexcept
 Move constructor.
KeyedRowVectoroperator= (const KeyedRowVector &other)
 Copy assignment operator.
KeyedRowVectoroperator= (const KeyedRowVector< Scalar, ColKeyType, Eigen::Dynamic > &other)
 Copy assignment operator.
KeyedRowVectoroperator= (KeyedRowVector &&other) noexcept
 Move assignment operator.
KeyedRowVectoroperator= (KeyedRowVector< Scalar, ColKeyType, Eigen::Dynamic > &&other) noexcept
 Move assignment operator.
KeyedVector< Scalar, ColKeyType, Cols > transposed () const
 Calculates the transposed vector.
 ~KeyedRowVector ()=default
 Destructor.
Public Member Functions inherited from NAV::internal::KeyedRowVectorBase< Scalar, ColKeyType, Cols >
template<typename Derived>
 KeyedRowVectorBase (const Eigen::MatrixBase< Derived > &vector)
 Constructor.
template<typename Derived>
 KeyedRowVectorBase (const Eigen::MatrixBase< Derived > &vector, std::span< const ColKeyType > colKeys)
 Constructor.
 KeyedRowVectorBase (const KeyedRowVectorBase &other)
 Copy constructor.
template<int oCols>
 KeyedRowVectorBase (const KeyedRowVectorBase< Scalar, ColKeyType, oCols > &other)
 Copy constructor.
 KeyedRowVectorBase (KeyedRowVectorBase &&other) noexcept
 Move constructor.
template<int oCols>
 KeyedRowVectorBase (KeyedRowVectorBase< Scalar, ColKeyType, oCols > &&other) noexcept
 Move constructor.
 operator Eigen::RowVector< Scalar, Cols > ()
 Conversion into Eigen::RowVector.
Eigen::Matrix< Scalar, 1, Cols > & operator() (all_t)
 Requests the full vector.
const Eigen::Matrix< Scalar, 1, Cols > & operator() (all_t) const
 Requests the full vector.
Scalar & operator() (const ColKeyType &colKey)
 Gets the value for the col key.
const Scalar & operator() (const ColKeyType &colKey) const
 Gets the value for the col key.
decltype(auto) operator() (std::span< const ColKeyType > colKeys)
 Gets the values for the col keys.
decltype(auto) operator() (std::span< const ColKeyType > colKeys) const
 Gets the values for the col keys.
KeyedRowVectorBaseoperator= (const KeyedRowVectorBase &other)
 Copy assignment operator.
template<int oCols>
KeyedRowVectorBaseoperator= (const KeyedRowVectorBase< Scalar, ColKeyType, oCols > &other)
 Copy assignment operator.
KeyedRowVectorBaseoperator= (KeyedRowVectorBase &&other) noexcept
 Move assignment operator.
template<int oCols>
KeyedRowVectorBaseoperator= (KeyedRowVectorBase< Scalar, ColKeyType, oCols > &&other) noexcept
 Move assignment operator.
template<size_t Q>
decltype(auto) segment (std::span< const ColKeyType > colKeys)
 Gets the values for the col keys.
decltype(auto) segment (std::span< const ColKeyType > colKeys)
 Gets the values for the col keys.
template<size_t Q>
decltype(auto) segment (std::span< const ColKeyType > colKeys) const
 Gets the values for the col keys.
decltype(auto) segment (std::span< const ColKeyType > colKeys) const
 Gets the values for the col keys.
KeyedVectorBase< Scalar, ColKeyType, Cols > transposed () const
 Calculates the transposed vector.
 ~KeyedRowVectorBase ()=default
 Destructor.
Public Member Functions inherited from NAV::internal::KeyedMatrixColsBase< Scalar, ColKeyType, Rows, Cols >
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.

Additional Inherited Members

Protected Attributes inherited from NAV::internal::KeyedMatrixColsBase< Scalar, ColKeyType, Rows, Cols >
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.

Detailed Description

template<typename Scalar, typename ColKeyType, int Cols>
class NAV::KeyedRowVector< Scalar, ColKeyType, Cols >

Static sized KeyedRowVector.

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

Definition at line 1692 of file KeyedMatrix.hpp.

Constructor & Destructor Documentation

◆ KeyedRowVector() [1/5]

template<typename Scalar, typename ColKeyType, int Cols>
template<typename Derived>
NAV::KeyedRowVector< Scalar, ColKeyType, Cols >::KeyedRowVector ( const Eigen::MatrixBase< Derived > & vector,
std::span< const ColKeyType > colKeys )
inline

RowVector constructor.

Template Parameters
DerivedDerived Eigen Type
Parameters
vectorEigen vector to initialize from
colKeysCol keys describing the vector

Definition at line 1700 of file KeyedMatrix.hpp.

◆ ~KeyedRowVector()

template<typename Scalar, typename ColKeyType, int Cols>
NAV::KeyedRowVector< Scalar, ColKeyType, Cols >::~KeyedRowVector ( )
default

Destructor.

◆ KeyedRowVector() [2/5]

template<typename Scalar, typename ColKeyType, int Cols>
NAV::KeyedRowVector< Scalar, ColKeyType, Cols >::KeyedRowVector ( const KeyedRowVector< Scalar, ColKeyType, Cols > & other)
inline

Copy constructor.

Parameters
otherThe other object

Definition at line 1712 of file KeyedMatrix.hpp.

◆ KeyedRowVector() [3/5]

template<typename Scalar, typename ColKeyType, int Cols>
NAV::KeyedRowVector< Scalar, ColKeyType, Cols >::KeyedRowVector ( KeyedRowVector< Scalar, ColKeyType, Cols > && other)
inlinenoexcept

Move constructor.

Parameters
otherThe other object

Definition at line 1728 of file KeyedMatrix.hpp.

◆ KeyedRowVector() [4/5]

template<typename Scalar, typename ColKeyType, int Cols>
NAV::KeyedRowVector< Scalar, ColKeyType, Cols >::KeyedRowVector ( const KeyedRowVector< Scalar, ColKeyType, Eigen::Dynamic > & other)
inline

Copy constructor.

Parameters
otherThe other object

Definition at line 1749 of file KeyedMatrix.hpp.

◆ KeyedRowVector() [5/5]

template<typename Scalar, typename ColKeyType, int Cols>
NAV::KeyedRowVector< Scalar, ColKeyType, Cols >::KeyedRowVector ( KeyedRowVector< Scalar, ColKeyType, Eigen::Dynamic > && other)
inlinenoexcept

Move constructor.

Parameters
otherThe other object

Definition at line 1769 of file KeyedMatrix.hpp.

Member Function Documentation

◆ operator=() [1/4]

template<typename Scalar, typename ColKeyType, int Cols>
KeyedRowVector & NAV::KeyedRowVector< Scalar, ColKeyType, Cols >::operator= ( const KeyedRowVector< Scalar, ColKeyType, Cols > & other)
inline

Copy assignment operator.

Parameters
otherThe other object

Definition at line 1717 of file KeyedMatrix.hpp.

◆ operator=() [2/4]

template<typename Scalar, typename ColKeyType, int Cols>
KeyedRowVector & NAV::KeyedRowVector< Scalar, ColKeyType, Cols >::operator= ( const KeyedRowVector< Scalar, ColKeyType, Eigen::Dynamic > & other)
inline

Copy assignment operator.

Parameters
otherThe other object

Definition at line 1756 of file KeyedMatrix.hpp.

◆ operator=() [3/4]

template<typename Scalar, typename ColKeyType, int Cols>
KeyedRowVector & NAV::KeyedRowVector< Scalar, ColKeyType, Cols >::operator= ( KeyedRowVector< Scalar, ColKeyType, Cols > && other)
inlinenoexcept

Move assignment operator.

Parameters
otherThe other object

Definition at line 1733 of file KeyedMatrix.hpp.

◆ operator=() [4/4]

template<typename Scalar, typename ColKeyType, int Cols>
KeyedRowVector & NAV::KeyedRowVector< Scalar, ColKeyType, Cols >::operator= ( KeyedRowVector< Scalar, ColKeyType, Eigen::Dynamic > && other)
inlinenoexcept

Move assignment operator.

Parameters
otherThe other object

Definition at line 1776 of file KeyedMatrix.hpp.

◆ transposed()

template<typename Scalar, typename ColKeyType, int Cols>
KeyedVector< Scalar, ColKeyType, Cols > NAV::KeyedRowVector< Scalar, ColKeyType, Cols >::transposed ( ) const
inlinenodiscard

Calculates the transposed vector.

Definition at line 1793 of file KeyedMatrix.hpp.


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