WPILibC++ 2023.4.3
Eigen::VectorBlock< VectorType, Size > Class Template Reference

Expression of a fixed-size or dynamic-size sub-vector. More...

#include </home/runner/work/allwpilib/allwpilib/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/VectorBlock.h>

Inheritance diagram for Eigen::VectorBlock< VectorType, Size >:
Eigen::Block< VectorType, internal::traits< VectorType >::Flags &RowMajorBit ? 1 :Size, internal::traits< VectorType >::Flags &RowMajorBit ? Size :1 > Eigen::BlockImpl< VectorType, BlockRows, BlockCols, InnerPanel, internal::traits< VectorType >::StorageKind >

Public Member Functions

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE VectorBlock (VectorType &vector, Index start, Index size)
 Dynamic-size constructor. More...
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE VectorBlock (VectorType &vector, Index start)
 Fixed-size constructor. More...
 
- Public Member Functions inherited from Eigen::Block< VectorType, internal::traits< VectorType >::Flags &RowMajorBit ? 1 :Size, internal::traits< VectorType >::Flags &RowMajorBit ? Size :1 >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Block (VectorType &xpr, Index i)
 Column or Row constructor. More...
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Block (VectorType &xpr, Index startRow, Index startCol)
 Fixed-size constructor. More...
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Block (VectorType &xpr, Index startRow, Index startCol, Index blockRows, Index blockCols)
 Dynamic-size constructor. More...
 

Additional Inherited Members

- Public Types inherited from Eigen::Block< VectorType, internal::traits< VectorType >::Flags &RowMajorBit ? 1 :Size, internal::traits< VectorType >::Flags &RowMajorBit ? Size :1 >
typedef Impl Base
 
typedef internal::remove_all< VectorType >::type NestedExpression
 

Detailed Description

template<typename VectorType, int Size>
class Eigen::VectorBlock< VectorType, Size >

Expression of a fixed-size or dynamic-size sub-vector.

Template Parameters
VectorTypethe type of the object in which we are taking a sub-vector
Sizesize 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 manipulate 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)

Constructor & Destructor Documentation

◆ VectorBlock() [1/2]

template<typename VectorType , int Size>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::VectorBlock< VectorType, Size >::VectorBlock ( VectorType &  vector,
Index  start,
Index  size 
)
inline

Dynamic-size constructor.

◆ VectorBlock() [2/2]

template<typename VectorType , int Size>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::VectorBlock< VectorType, Size >::VectorBlock ( VectorType &  vector,
Index  start 
)
inline

Fixed-size constructor.


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