0.2.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, const std::vector< 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, const std::vector< 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() (const std::vector< ColKeyType > &colKeys)
 Gets the values for the col keys.
 
decltype(auto) operator() (const std::vector< 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 (const std::vector< ColKeyType > &colKeys)
 Gets the values for the col keys.
 
decltype(auto) segment (const std::vector< ColKeyType > &colKeys)
 Gets the values for the col keys.
 
template<size_t Q>
decltype(auto) segment (const std::vector< ColKeyType > &colKeys) const
 Gets the values for the col keys.
 
decltype(auto) segment (const std::vector< 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 (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.
 

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 >
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

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,
const std::vector< ColKeyType > & colKeys )
inline

RowVector constructor.

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

◆ 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

◆ 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

◆ 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

◆ 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

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

◆ 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

◆ 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

◆ 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

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