Shapeworks Studio  2.1
Shape analysis software suite
List of all members | Public Member Functions
Eigen::VectorBlock< VectorType, Size > Class Template Reference

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

#include <VectorBlock.h>

+ Inheritance diagram for Eigen::VectorBlock< VectorType, Size >:
+ Collaboration diagram for Eigen::VectorBlock< VectorType, Size >:

Public Member Functions

 VectorBlock (VectorType &vector, Index start, Index size)
 
 VectorBlock (VectorType &vector, Index start)
 
- Public Member Functions inherited from Eigen::Block< VectorType, internal::traits< VectorType >::Flags &RowMajorBit?1:Size, internal::traits< VectorType >::Flags &RowMajorBit?Size:1 >
 Block (VectorType &xpr, Index i)
 
 Block (VectorType &xpr, Index a_startRow, Index a_startCol)
 
 Block (VectorType &xpr, Index a_startRow, Index a_startCol, Index blockRows, Index blockCols)
 

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
 

Detailed Description

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

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

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 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 83 of file ForwardDeclarations.h.

Constructor & Destructor Documentation

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

Dynamic-size constructor

Definition at line 75 of file VectorBlock.h.

76  : Base(vector,
77  IsColVector ? start : 0, IsColVector ? 0 : start,
78  IsColVector ? size : 1, IsColVector ? 1 : size)
79  {
80  EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorBlock);
81  }
VectorBlock(VectorType &vector, Index start, Index size)
Definition: VectorBlock.h:75
template<typename VectorType, int Size>
Eigen::VectorBlock< VectorType, Size >::VectorBlock ( VectorType &  vector,
Index  start 
)
inline

Fixed-size constructor

Definition at line 85 of file VectorBlock.h.

86  : Base(vector, IsColVector ? start : 0, IsColVector ? 0 : start)
87  {
88  EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorBlock);
89  }
VectorBlock(VectorType &vector, Index start, Index size)
Definition: VectorBlock.h:75

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