Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Eigen::VectorBlock< VectorType, Size > Class Template Reference

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

#include <src/eigen/Eigen/src/Core/VectorBlock.h>

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

Public Types

typedef internal::remove_all< VectorType >::type NestedExpression
 

Public Member Functions

EIGEN_DEVICE_FUNC VectorBlock (VectorType &vector, Index start, Index size)
 
EIGEN_DEVICE_FUNC VectorBlock (VectorType &vector, Index start)
 

Private Types

enum  { IsColVector = !(internal::traits<VectorType>::Flags & RowMajorBit) }
 
typedef Block< VectorType, internal::traits< VectorType >::Flags &RowMajorBit ? 1 :Size, internal::traits< VectorType >::Flags &RowMajorBit ? Size :1 > Base
 
typedef BlockImpl< VectorType, BlockRows, BlockCols, InnerPanel, typename internal::traits< VectorType >::StorageKind > Impl
 

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

Member Typedef Documentation

◆ Base

template<typename VectorType , int Size>
typedef Block<VectorType, internal::traits<VectorType>::Flags & RowMajorBit ? 1 : Size, internal::traits<VectorType>::Flags & RowMajorBit ? Size : 1> Eigen::VectorBlock< VectorType, Size >::Base
private

◆ Impl

typedef BlockImpl<VectorType , BlockRows, BlockCols, InnerPanel, typename internal::traits<VectorType >::StorageKind> Eigen::Block< VectorType , BlockRows, BlockCols, InnerPanel >::Impl
privateinherited

◆ NestedExpression

typedef internal::remove_all<VectorType >::type Eigen::Block< VectorType , BlockRows, BlockCols, InnerPanel >::NestedExpression
inherited

Member Enumeration Documentation

◆ anonymous enum

template<typename VectorType , int Size>
anonymous enum
private
Enumerator
IsColVector 
64 {
65 IsColVector = !(internal::traits<VectorType>::Flags & RowMajorBit)
66 };
@ IsColVector
Definition VectorBlock.h:65
const unsigned int RowMajorBit
Definition Constants.h:61

Constructor & Destructor Documentation

◆ VectorBlock() [1/2]

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

Dynamic-size constructor

76 : Base(vector,
77 IsColVector ? start : 0, IsColVector ? 0 : start,
78 IsColVector ? size : 1, IsColVector ? 1 : size)
79 {
81 }
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition StaticAssert.h:139
Block< VectorType, internal::traits< VectorType >::Flags &RowMajorBit ? 1 :Size, internal::traits< VectorType >::Flags &RowMajorBit ? Size :1 > Base
Definition VectorBlock.h:63
constexpr auto size(const C &c) -> decltype(c.size())
Definition span.hpp:183

References EIGEN_STATIC_ASSERT_VECTOR_ONLY.

◆ VectorBlock() [2/2]

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

Fixed-size constructor

87 : Base(vector, IsColVector ? start : 0, IsColVector ? 0 : start)
88 {
90 }

References EIGEN_STATIC_ASSERT_VECTOR_ONLY.


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