Eigne Matrix Class Library
Dependents: Eigen_test Odometry_test AttitudeEstimation_usingTicker MPU9250_Quaternion_Binary_Serial ... more
VectorBlock< VectorType, Size > Class Template Reference
[Core module]
Expression of a fixed-size or dynamic-size sub-vector. More...
#include <VectorBlock.h>
Public Member Functions | |
EIGEN_DENSE_PUBLIC_INTERFACE(VectorBlock) using Base | VectorBlock (VectorType &vector, Index start, Index size) |
Dynamic-size constructor. | |
VectorBlock (VectorType &vector, Index start) | |
Fixed-size constructor. | |
EIGEN_GENERIC_PUBLIC_INTERFACE (Block) EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block) inline Block(VectorType &xpr | |
Column or Row constructor. |
Detailed Description
template<typename VectorType, int Size>
class Eigen::VectorBlock< VectorType, Size >
Expression of a fixed-size or dynamic-size sub-vector.
- Parameters:
-
VectorType the type of the object in which we are taking a sub-vector Size size of the sub-vector we are taking at compile time (optional)
This class represents an expression of either a fixed-size or dynamic-size sub-vector. It is the return type of DenseBase::segment(Index,Index) and DenseBase::segment<int>(Index) and most of the time this is the only way it is used.
However, if you want to directly maniputate sub-vector expressions, for instance if you want to write a function returning such an expression, you will need to use this class.
Here is an example illustrating the dynamic case:
Output:
- Note:
- Even though this expression has dynamic size, in the case where VectorType has fixed size, this expression inherits a fixed maximal size which means that evaluating it does not cause a dynamic memory allocation.
Here is an example illustrating the fixed-size case:
Output:
- See also:
- class Block, DenseBase::segment(Index,Index,Index,Index), DenseBase::segment(Index,Index)
Definition at line 57 of file VectorBlock.h.
Constructor & Destructor Documentation
EIGEN_DENSE_PUBLIC_INTERFACE (VectorBlock) using Base VectorBlock | ( | VectorType & | vector, |
Index | start, | ||
Index | size | ||
) |
Dynamic-size constructor.
Definition at line 75 of file VectorBlock.h.
VectorBlock | ( | VectorType & | vector, |
Index | start | ||
) |
Fixed-size constructor.
Definition at line 85 of file VectorBlock.h.
Member Function Documentation
EIGEN_GENERIC_PUBLIC_INTERFACE | ( | Block< VectorType, internal::traits< VectorType >::Flags &RowMajorBit?1:Size, internal::traits< VectorType >::Flags &RowMajorBit?Size:1 > | ) | [inherited] |
Column or Row constructor.
Generated on Tue Jul 12 2022 17:47:05 by 1.7.2