0.2.0
Loading...
Searching...
No Matches
NAV::internal::KeyedRowVectorBase< Scalar, ColKeyType, Cols > Class Template Reference

Class to inherit common methods for static and dynamic sized row vectors. More...

Public Member Functions

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::internal::KeyedRowVectorBase< Scalar, ColKeyType, Cols >

Class to inherit common methods for static and dynamic sized row vectors.

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

◆ KeyedRowVectorBase() [1/6]

template<typename Scalar , typename ColKeyType , int Cols>
template<typename Derived >
NAV::internal::KeyedRowVectorBase< Scalar, ColKeyType, Cols >::KeyedRowVectorBase ( const Eigen::MatrixBase< Derived > & vector)
inlineexplicit

Constructor.

Parameters
vectorEigen vector to initialize from

◆ KeyedRowVectorBase() [2/6]

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

Constructor.

Parameters
vectorEigen vector to initialize from
colKeysCol keys describing the vector

◆ KeyedRowVectorBase() [3/6]

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

Copy constructor.

Parameters
otherThe other object

◆ KeyedRowVectorBase() [4/6]

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

Move constructor.

Parameters
otherThe other object

◆ KeyedRowVectorBase() [5/6]

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

Copy constructor.

Parameters
otherThe other object

◆ KeyedRowVectorBase() [6/6]

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

Move constructor.

Parameters
otherThe other object

Member Function Documentation

◆ operator()() [1/4]

template<typename Scalar , typename ColKeyType , int Cols>
Scalar & NAV::internal::KeyedRowVectorBase< Scalar, ColKeyType, Cols >::operator() ( const ColKeyType & colKey)
inline

Gets the value for the col key.

Parameters
colKeyCol Key
Returns
Scalar value

◆ operator()() [2/4]

template<typename Scalar , typename ColKeyType , int Cols>
const Scalar & NAV::internal::KeyedRowVectorBase< Scalar, ColKeyType, Cols >::operator() ( const ColKeyType & colKey) const
inline

Gets the value for the col key.

Parameters
colKeyCol Key
Returns
Scalar value

◆ operator()() [3/4]

template<typename Scalar , typename ColKeyType , int Cols>
decltype(auto) NAV::internal::KeyedRowVectorBase< Scalar, ColKeyType, Cols >::operator() ( const std::vector< ColKeyType > & colKeys)
inline

Gets the values for the col keys.

Parameters
colKeysCol Keys
Returns
View into the matrix for the col keys

◆ operator()() [4/4]

template<typename Scalar , typename ColKeyType , int Cols>
decltype(auto) NAV::internal::KeyedRowVectorBase< Scalar, ColKeyType, Cols >::operator() ( const std::vector< ColKeyType > & colKeys) const
inline

Gets the values for the col keys.

Parameters
colKeysCol Keys
Returns
View into the matrix for the col keys

◆ operator=() [1/4]

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

Copy assignment operator.

Parameters
otherThe other object

◆ operator=() [2/4]

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

Copy assignment operator.

Parameters
otherThe other object

◆ operator=() [3/4]

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

Move assignment operator.

Parameters
otherThe other object

◆ operator=() [4/4]

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

Move assignment operator.

Parameters
otherThe other object

◆ segment() [1/4]

template<typename Scalar , typename ColKeyType , int Cols>
template<size_t Q>
decltype(auto) NAV::internal::KeyedRowVectorBase< Scalar, ColKeyType, Cols >::segment ( const std::vector< ColKeyType > & colKeys)
inline

Gets the values for the col keys.

Parameters
colKeysCol Keys
Returns
View into the matrix for the col keys

◆ segment() [2/4]

template<typename Scalar , typename ColKeyType , int Cols>
decltype(auto) NAV::internal::KeyedRowVectorBase< Scalar, ColKeyType, Cols >::segment ( const std::vector< ColKeyType > & colKeys)
inline

Gets the values for the col keys.

Parameters
colKeysCol Keys
Returns
View into the matrix for the col keys

◆ segment() [3/4]

template<typename Scalar , typename ColKeyType , int Cols>
template<size_t Q>
decltype(auto) NAV::internal::KeyedRowVectorBase< Scalar, ColKeyType, Cols >::segment ( const std::vector< ColKeyType > & colKeys) const
inline

Gets the values for the col keys.

Parameters
colKeysCol Keys
Returns
View into the matrix for the col keys

◆ segment() [4/4]

template<typename Scalar , typename ColKeyType , int Cols>
decltype(auto) NAV::internal::KeyedRowVectorBase< Scalar, ColKeyType, Cols >::segment ( const std::vector< ColKeyType > & colKeys) const
inline

Gets the values for the col keys.

Parameters
colKeysCol Keys
Returns
View into the matrix for the col keys

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