WPILibC++ 2023.4.3-108-ge5452e3
BlockMethods.h File Reference

Go to the source code of this file.

Classes

struct  NColsBlockXpr< N >
 
struct  ConstNColsBlockXpr< N >
 
struct  NRowsBlockXpr< N >
 
struct  ConstNRowsBlockXpr< N >
 
struct  FixedBlockXpr< Rows, Cols >
 
struct  ConstFixedBlockXpr< Rows, Cols >
 
struct  FixedSegmentReturnType< Size >
 
struct  ConstFixedSegmentReturnType< Size >
 

Typedefs

typedef Block< Derived, internal::traits< Derived >::RowsAtCompileTime, 1, !IsRowMajor > ColXpr
 
typedef const Block< const Derived, internal::traits< Derived >::RowsAtCompileTime, 1, !IsRowMajor > ConstColXpr
 
typedef Block< Derived, 1, internal::traits< Derived >::ColsAtCompileTime, IsRowMajor > RowXpr
 
typedef const Block< const Derived, 1, internal::traits< Derived >::ColsAtCompileTime, IsRowMajor > ConstRowXpr
 
typedef Block< Derived, internal::traits< Derived >::RowsAtCompileTime, Dynamic, !IsRowMajor > ColsBlockXpr
 
typedef const Block< const Derived, internal::traits< Derived >::RowsAtCompileTime, Dynamic, !IsRowMajor > ConstColsBlockXpr
 
typedef Block< Derived, Dynamic, internal::traits< Derived >::ColsAtCompileTime, IsRowMajor > RowsBlockXpr
 
typedef const Block< const Derived, Dynamic, internal::traits< Derived >::ColsAtCompileTime, IsRowMajor > ConstRowsBlockXpr
 
typedef Block< Derived > BlockXpr
 
typedef const Block< const Derived > ConstBlockXpr
 
typedef VectorBlock< Derived > SegmentReturnType
 
typedef const VectorBlock< const Derived > ConstSegmentReturnType
 
typedef Block< Derived, IsRowMajor?1:Dynamic, IsRowMajor?Dynamic:1, true > InnerVectorReturnType
 
typedef Block< const Derived, IsRowMajor?1:Dynamic, IsRowMajor?Dynamic:1, true > ConstInnerVectorReturnType
 
typedef Block< Derived, Dynamic, Dynamic, true > InnerVectorsReturnType
 
typedef Block< const Derived, Dynamic, Dynamic, true > ConstInnerVectorsReturnType
 

Functions

template<typename NRowsType , typename NColsType >
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type block (Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols)
 
template<typename NRowsType , typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type block (Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols) const
 This is the const version of block(Index,Index,NRowsType,NColsType) More...
 
template<typename NRowsType , typename NColsType >
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type topRightCorner (NRowsType cRows, NColsType cCols)
 
template<typename NRowsType , typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type topRightCorner (NRowsType cRows, NColsType cCols) const
 This is the const version of topRightCorner(NRowsType, NColsType). More...
 
template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type topRightCorner ()
 
template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type topRightCorner () const
 This is the const version of topRightCorner<int, int>(). More...
 
template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type topRightCorner (Index cRows, Index cCols)
 
template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type topRightCorner (Index cRows, Index cCols) const
 This is the const version of topRightCorner<int, int>(Index, Index). More...
 
template<typename NRowsType , typename NColsType >
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type topLeftCorner (NRowsType cRows, NColsType cCols)
 
template<typename NRowsType , typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type topLeftCorner (NRowsType cRows, NColsType cCols) const
 This is the const version of topLeftCorner(Index, Index). More...
 
template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type topLeftCorner ()
 
template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type topLeftCorner () const
 This is the const version of topLeftCorner<int, int>(). More...
 
template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type topLeftCorner (Index cRows, Index cCols)
 
template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type topLeftCorner (Index cRows, Index cCols) const
 This is the const version of topLeftCorner<int, int>(Index, Index). More...
 
template<typename NRowsType , typename NColsType >
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type bottomRightCorner (NRowsType cRows, NColsType cCols)
 
template<typename NRowsType , typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type bottomRightCorner (NRowsType cRows, NColsType cCols) const
 This is the const version of bottomRightCorner(NRowsType, NColsType). More...
 
template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type bottomRightCorner ()
 
template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type bottomRightCorner () const
 This is the const version of bottomRightCorner<int, int>(). More...
 
template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type bottomRightCorner (Index cRows, Index cCols)
 
template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type bottomRightCorner (Index cRows, Index cCols) const
 This is the const version of bottomRightCorner<int, int>(Index, Index). More...
 
template<typename NRowsType , typename NColsType >
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type bottomLeftCorner (NRowsType cRows, NColsType cCols)
 
template<typename NRowsType , typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstFixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type bottomLeftCorner (NRowsType cRows, NColsType cCols) const
 This is the const version of bottomLeftCorner(NRowsType, NColsType). More...
 
template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type bottomLeftCorner ()
 
template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type bottomLeftCorner () const
 This is the const version of bottomLeftCorner<int, int>(). More...
 
template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type bottomLeftCorner (Index cRows, Index cCols)
 
template<int CRows, int CCols>
EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type bottomLeftCorner (Index cRows, Index cCols) const
 This is the const version of bottomLeftCorner<int, int>(Index, Index). More...
 
template<typename NRowsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type topRows (NRowsType n)
 
template<typename NRowsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstNRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type topRows (NRowsType n) const
 This is the const version of topRows(NRowsType). More...
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< N >::Type topRows (Index n=N)
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstNRowsBlockXpr< N >::Type topRows (Index n=N) const
 This is the const version of topRows<int>(). More...
 
template<typename NRowsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type bottomRows (NRowsType n)
 
template<typename NRowsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstNRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type bottomRows (NRowsType n) const
 This is the const version of bottomRows(NRowsType). More...
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< N >::Type bottomRows (Index n=N)
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstNRowsBlockXpr< N >::Type bottomRows (Index n=N) const
 This is the const version of bottomRows<int>(). More...
 
template<typename NRowsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type middleRows (Index startRow, NRowsType n)
 
template<typename NRowsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstNRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type middleRows (Index startRow, NRowsType n) const
 This is the const version of middleRows(Index,NRowsType). More...
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< N >::Type middleRows (Index startRow, Index n=N)
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstNRowsBlockXpr< N >::Type middleRows (Index startRow, Index n=N) const
 This is the const version of middleRows<int>(). More...
 
template<typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type leftCols (NColsType n)
 
template<typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstNColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type leftCols (NColsType n) const
 This is the const version of leftCols(NColsType). More...
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NColsBlockXpr< N >::Type leftCols (Index n=N)
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstNColsBlockXpr< N >::Type leftCols (Index n=N) const
 This is the const version of leftCols<int>(). More...
 
template<typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type rightCols (NColsType n)
 
template<typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstNColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type rightCols (NColsType n) const
 This is the const version of rightCols(NColsType). More...
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NColsBlockXpr< N >::Type rightCols (Index n=N)
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstNColsBlockXpr< N >::Type rightCols (Index n=N) const
 This is the const version of rightCols<int>(). More...
 
template<typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type middleCols (Index startCol, NColsType numCols)
 
template<typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstNColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type middleCols (Index startCol, NColsType numCols) const
 This is the const version of middleCols(Index,NColsType). More...
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NColsBlockXpr< N >::Type middleCols (Index startCol, Index n=N)
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstNColsBlockXpr< N >::Type middleCols (Index startCol, Index n=N) const
 This is the const version of middleCols<int>(). More...
 
template<int NRows, int NCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< NRows, NCols >::Type block (Index startRow, Index startCol)
 
template<int NRows, int NCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< NRows, NCols >::Type block (Index startRow, Index startCol) const
 This is the const version of block<>(Index, Index). *‍/. More...
 
template<int NRows, int NCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< NRows, NCols >::Type block (Index startRow, Index startCol, Index blockRows, Index blockCols)
 
template<int NRows, int NCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< NRows, NCols >::Type block (Index startRow, Index startCol, Index blockRows, Index blockCols) const
 This is the const version of block<>(Index, Index, Index, Index). More...
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ColXpr col (Index i) const
 This is the const version of col(). More...
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE RowXpr row (Index i) const
 This is the const version of row(). *‍/. More...
 
template<typename NType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedSegmentReturnType< internal::get_fixed_value< NType >::value >::Type segment (Index start, NType n)
 
template<typename NType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedSegmentReturnType< internal::get_fixed_value< NType >::value >::Type segment (Index start, NType n) const
 This is the const version of segment(Index,NType). More...
 
template<typename NType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedSegmentReturnType< internal::get_fixed_value< NType >::value >::Type head (NType n)
 
template<typename NType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedSegmentReturnType< internal::get_fixed_value< NType >::value >::Type head (NType n) const
 This is the const version of head(NType). More...
 
template<typename NType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedSegmentReturnType< internal::get_fixed_value< NType >::value >::Type tail (NType n)
 
template<typename NType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedSegmentReturnType< internal::get_fixed_value< NType >::value >::Type tail (NType n) const
 This is the const version of tail(Index). More...
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedSegmentReturnType< N >::Type segment (Index start, Index n=N)
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstFixedSegmentReturnType< N >::Type segment (Index start, Index n=N) const
 This is the const version of segment<int>(Index). More...
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedSegmentReturnType< N >::Type head (Index n=N)
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstFixedSegmentReturnType< N >::Type head (Index n=N) const
 This is the const version of head<int>(). More...
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedSegmentReturnType< N >::Type tail (Index n=N)
 
template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstFixedSegmentReturnType< N >::Type tail (Index n=N) const
 This is the const version of tail<int>. More...
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE InnerVectorReturnType innerVector (Index outer)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE InnerVectorsReturnType innerVectors (Index outerStart, Index outerSize)
 
template<DirectionType Direction>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::conditional< Direction==Vertical, ColXpr, RowXpr >::type subVector (Index i)
 
template<DirectionType Direction>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::conditional< Direction==Vertical, ConstColXpr, ConstRowXpr >::type subVector (Index i) const
 This is the const version of subVector(Index) More...
 
template<DirectionType Direction>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index subVectors () const
 

Typedef Documentation

◆ BlockXpr

typedef Block<Derived> BlockXpr

◆ ColsBlockXpr

typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ColsBlockXpr

◆ ColXpr

typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ColXpr

◆ ConstBlockXpr

typedef const Block<const Derived> ConstBlockXpr

◆ ConstColsBlockXpr

typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ConstColsBlockXpr

◆ ConstColXpr

typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ConstColXpr

◆ ConstInnerVectorReturnType

typedef Block<const Derived,IsRowMajor?1:Dynamic,IsRowMajor?Dynamic:1,true> ConstInnerVectorReturnType

◆ ConstInnerVectorsReturnType

typedef Block<const Derived,Dynamic,Dynamic,true> ConstInnerVectorsReturnType

◆ ConstRowsBlockXpr

typedef const Block<const Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowsBlockXpr

◆ ConstRowXpr

typedef const Block<const Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowXpr

◆ ConstSegmentReturnType

typedef const VectorBlock<const Derived> ConstSegmentReturnType

◆ InnerVectorReturnType

typedef Block<Derived,IsRowMajor?1:Dynamic,IsRowMajor?Dynamic:1,true> InnerVectorReturnType

◆ InnerVectorsReturnType

typedef Block<Derived,Dynamic,Dynamic,true> InnerVectorsReturnType

◆ RowsBlockXpr

typedef Block<Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowsBlockXpr

◆ RowXpr

typedef Block<Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowXpr

◆ SegmentReturnType

typedef VectorBlock<Derived> SegmentReturnType

Function Documentation

◆ block() [1/6]

template<int NRows, int NCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< NRows, NCols >::Type block ( Index  startRow,
Index  startCol 
)
Returns
a fixed-size expression of a block of *this.

The template parameters NRows and NCols are the number of rows and columns in the block.

Parameters
startRowthe first row in the block
startColthe first column in the block

Example:

Output:

Note
The usage of of this overload is discouraged from Eigen 3.4, better used the generic block(Index,Index,NRowsType,NColsType), here is the one-to-one equivalence:
mat.template block<NRows,NCols>(i,j) <--> mat.block(i,j,fix<NRows>,fix<NCols>)
since block is a templated member, the keyword template has to be used if the matrix type is also a template parameter:
m.template block<3,3>(1,1);
See also
block(Index,Index,NRowsType,NColsType), class Block

◆ block() [2/6]

template<int NRows, int NCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< NRows, NCols >::Type block ( Index  startRow,
Index  startCol 
) const

This is the const version of block<>(Index, Index). *‍/.

◆ block() [3/6]

template<int NRows, int NCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< NRows, NCols >::Type block ( Index  startRow,
Index  startCol,
Index  blockRows,
Index  blockCols 
)
Returns
an expression of a block of *this.
Template Parameters
NRowsnumber of rows in block as specified at compile-time
NColsnumber of columns in block as specified at compile-time
Parameters
startRowthe first row in the block
startColthe first column in the block
blockRowsnumber of rows in block as specified at run-time
blockColsnumber of columns in block as specified at run-time

This function is mainly useful for blocks where the number of rows is specified at compile-time and the number of columns is specified at run-time, or vice versa. The compile-time and run-time information should not contradict. In other words, blockRows should equal NRows unless NRows is Dynamic, and the same for the number of columns.

Example:

Output:

Note
The usage of of this overload is discouraged from Eigen 3.4, better used the generic block(Index,Index,NRowsType,NColsType), here is the one-to-one complete equivalence:
mat.template block<NRows,NCols>(i,j,rows,cols) <--> mat.block(i,j,fix<NRows>(rows),fix<NCols>(cols))
If we known that, e.g., NRows==Dynamic and NCols!=Dynamic, then the equivalence becomes:
mat.template block<Dynamic,NCols>(i,j,rows,NCols) <--> mat.block(i,j,rows,fix<NCols>)
See also
block(Index,Index,NRowsType,NColsType), class Block

◆ block() [4/6]

template<int NRows, int NCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< NRows, NCols >::Type block ( Index  startRow,
Index  startCol,
Index  blockRows,
Index  blockCols 
) const

This is the const version of block<>(Index, Index, Index, Index).

◆ block() [5/6]

template<typename NRowsType , typename NColsType >
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type block ( Index  startRow,
Index  startCol,
NRowsType  blockRows,
NColsType  blockCols 
)
Returns
an expression of a block in *this with either dynamic or fixed sizes.
Parameters
startRowthe first row in the block
startColthe first column in the block
blockRowsnumber of rows in the block, specified at either run-time or compile-time
blockColsnumber of columns in the block, specified at either run-time or compile-time
Template Parameters
NRowsTypethe type of the value handling the number of rows in the block, typically Index.
NColsTypethe type of the value handling the number of columns in the block, typically Index.

Example using runtime (aka dynamic) sizes:

Output:

\newin{3.4}:

The number of rows blockRows and columns blockCols can also be specified at compile-time by passing Eigen::fix<N>, or Eigen::fix<N>(n) as arguments. In the later case, n plays the role of a runtime fallback value in case N equals Eigen::Dynamic. Here is an example with a fixed number of rows NRows and dynamic number of columns cols:

mat.block(i,j,fix<NRows>,cols)

This function thus fully covers the features offered by the following overloads block<NRows,NCols>(Index, Index), and block<NRows,NCols>(Index, Index, Index, Index) that are thus obsolete. Indeed, this generic version avoids redundancy, it preserves the argument order, and prevents the need to rely on the template keyword in templated code.

but with less redundancy and more consistency as it does not modify the argument order and seamlessly enable hybrid fixed/dynamic sizes.

Note
Even in the case that the returned expression has dynamic size, in the case when it is applied to a fixed-size matrix, it inherits a fixed maximal size, which means that evaluating it does not cause a dynamic memory allocation.
See also
class Block, fix, fix<N>(int)

◆ block() [6/6]

template<typename NRowsType , typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type block ( Index  startRow,
Index  startCol,
NRowsType  blockRows,
NColsType  blockCols 
) const

This is the const version of block(Index,Index,NRowsType,NColsType)

◆ bottomLeftCorner() [1/6]

template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type bottomLeftCorner ( )
Returns
an expression of a fixed-size bottom-left corner of *this.

The template parameters CRows and CCols are the number of rows and columns in the corner.

Example:

Output:

block(Index,Index,NRowsType,NColsType), class Block

◆ bottomLeftCorner() [2/6]

template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type bottomLeftCorner ( ) const

This is the const version of bottomLeftCorner<int, int>().

◆ bottomLeftCorner() [3/6]

template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type bottomLeftCorner ( Index  cRows,
Index  cCols 
)
Returns
an expression of a bottom-left corner of *this.
Template Parameters
CRowsnumber of rows in corner as specified at compile-time
CColsnumber of columns in corner as specified at compile-time
Parameters
cRowsnumber of rows in corner as specified at run-time
cColsnumber of columns in corner as specified at run-time

This function is mainly useful for corners where the number of rows is specified at compile-time and the number of columns is specified at run-time, or vice versa. The compile-time and run-time information should not contradict. In other words, cRows should equal CRows unless CRows is Dynamic, and the same for the number of columns.

Example:

Output:

class Block

◆ bottomLeftCorner() [4/6]

template<int CRows, int CCols>
EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type bottomLeftCorner ( Index  cRows,
Index  cCols 
) const

This is the const version of bottomLeftCorner<int, int>(Index, Index).

◆ bottomLeftCorner() [5/6]

template<typename NRowsType , typename NColsType >
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type bottomLeftCorner ( NRowsType  cRows,
NColsType  cCols 
)
Returns
an expression of a bottom-left corner of *this with either dynamic or fixed sizes.
Parameters
cRowsthe number of rows in the corner
cColsthe number of columns in the corner
Template Parameters
NRowsTypethe type of the value handling the number of rows in the block, typically Index.
NColsTypethe type of the value handling the number of columns in the block, typically Index.

Example:

Output:

The number of rows blockRows and columns blockCols can also be specified at compile-time by passing Eigen::fix<N>, or Eigen::fix<N>(n) as arguments. See block() for the details.

See also
block(Index,Index,NRowsType,NColsType), class Block

◆ bottomLeftCorner() [6/6]

template<typename NRowsType , typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstFixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type bottomLeftCorner ( NRowsType  cRows,
NColsType  cCols 
) const

This is the const version of bottomLeftCorner(NRowsType, NColsType).

◆ bottomRightCorner() [1/6]

template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type bottomRightCorner ( )
Returns
an expression of a fixed-size bottom-right corner of *this.

The template parameters CRows and CCols are the number of rows and columns in the corner.

Example:

Output:

block(Index,Index,NRowsType,NColsType), class Block

◆ bottomRightCorner() [2/6]

template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type bottomRightCorner ( ) const

This is the const version of bottomRightCorner<int, int>().

◆ bottomRightCorner() [3/6]

template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type bottomRightCorner ( Index  cRows,
Index  cCols 
)
Returns
an expression of a bottom-right corner of *this.
Template Parameters
CRowsnumber of rows in corner as specified at compile-time
CColsnumber of columns in corner as specified at compile-time
Parameters
cRowsnumber of rows in corner as specified at run-time
cColsnumber of columns in corner as specified at run-time

This function is mainly useful for corners where the number of rows is specified at compile-time and the number of columns is specified at run-time, or vice versa. The compile-time and run-time information should not contradict. In other words, cRows should equal CRows unless CRows is Dynamic, and the same for the number of columns.

Example:

Output:

class Block

◆ bottomRightCorner() [4/6]

template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type bottomRightCorner ( Index  cRows,
Index  cCols 
) const

This is the const version of bottomRightCorner<int, int>(Index, Index).

◆ bottomRightCorner() [5/6]

template<typename NRowsType , typename NColsType >
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type bottomRightCorner ( NRowsType  cRows,
NColsType  cCols 
)
Returns
an expression of a bottom-right corner of *this with either dynamic or fixed sizes.
Parameters
cRowsthe number of rows in the corner
cColsthe number of columns in the corner
Template Parameters
NRowsTypethe type of the value handling the number of rows in the block, typically Index.
NColsTypethe type of the value handling the number of columns in the block, typically Index.

Example:

Output:

The number of rows blockRows and columns blockCols can also be specified at compile-time by passing Eigen::fix<N>, or Eigen::fix<N>(n) as arguments. See block() for the details.

See also
block(Index,Index,NRowsType,NColsType), class Block

◆ bottomRightCorner() [6/6]

template<typename NRowsType , typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type bottomRightCorner ( NRowsType  cRows,
NColsType  cCols 
) const

This is the const version of bottomRightCorner(NRowsType, NColsType).

◆ bottomRows() [1/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< N >::Type bottomRows ( Index  n = N)
Returns
a block consisting of the bottom rows of *this.
Template Parameters
Nthe number of rows in the block as specified at compile-time
Parameters
nthe number of rows in the block as specified at run-time

The compile-time and run-time information should not contradict. In other words, n should equal N unless N is Dynamic.

Example:

Output:

block(Index,Index,NRowsType,NColsType), class Block

◆ bottomRows() [2/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstNRowsBlockXpr< N >::Type bottomRows ( Index  n = N) const

This is the const version of bottomRows<int>().

◆ bottomRows() [3/4]

template<typename NRowsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type bottomRows ( NRowsType  n)
Returns
a block consisting of the bottom rows of *this.
Parameters
nthe number of rows in the block
Template Parameters
NRowsTypethe type of the value handling the number of rows in the block, typically Index.

Example:

Output:

The number of rows n can also be specified at compile-time by passing Eigen::fix<N>, or Eigen::fix<N>(n) as arguments. See block() for the details.

See also
block(Index,Index,NRowsType,NColsType), class Block

◆ bottomRows() [4/4]

template<typename NRowsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstNRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type bottomRows ( NRowsType  n) const

This is the const version of bottomRows(NRowsType).

◆ col()

This is the const version of col().

Returns
an expression of the i-th column of *this. Note that the numbering starts at 0.

Example:

Output:

row(), class Block

◆ head() [1/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedSegmentReturnType< N >::Type head ( Index  n = N)
Returns
a fixed-size expression of the first coefficients of *this.

\only_for_vectors

Template Parameters
Nthe number of coefficients in the segment as specified at compile-time
Parameters
nthe number of coefficients in the segment as specified at run-time

The compile-time and run-time information should not contradict. In other words, n should equal N unless N is Dynamic.

Example:

Output:

See also
head(NType), class Block

◆ head() [2/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstFixedSegmentReturnType< N >::Type head ( Index  n = N) const

This is the const version of head<int>().

◆ head() [3/4]

template<typename NType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedSegmentReturnType< internal::get_fixed_value< NType >::value >::Type head ( NType  n)
Returns
an expression of the first coefficients of *this with either dynamic or fixed sizes.

\only_for_vectors

Parameters
nthe number of coefficients in the segment
Template Parameters
NTypethe type of the value handling the number of coefficients in the segment, typically Index.

Example:

Output:

The number of coefficients n can also be specified at compile-time by passing Eigen::fix<N>, or Eigen::fix<N>(n) as arguments. See block() for the details.

Note
Even in the case that the returned expression has dynamic size, in the case when it is applied to a fixed-size vector, it inherits a fixed maximal size, which means that evaluating it does not cause a dynamic memory allocation.
See also
class Block, block(Index,Index)

◆ head() [4/4]

template<typename NType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedSegmentReturnType< internal::get_fixed_value< NType >::value >::Type head ( NType  n) const

This is the const version of head(NType).

◆ innerVector()

Returns
the outer -th column (resp. row) of the matrix *this if *this is col-major (resp. row-major).
the outer -th column (resp. row) of the matrix *this if *this is col-major (resp. row-major). Read-only.

◆ innerVectors()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstInnerVectorsReturnType innerVectors ( Index  outerStart,
Index  outerSize 
)
Returns
the outer -th column (resp. row) of the matrix *this if *this is col-major (resp. row-major).
the outer -th column (resp. row) of the matrix *this if *this is col-major (resp. row-major). Read-only.

◆ leftCols() [1/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NColsBlockXpr< N >::Type leftCols ( Index  n = N)
Returns
a block consisting of the left columns of *this.
Template Parameters
Nthe number of columns in the block as specified at compile-time
Parameters
nthe number of columns in the block as specified at run-time

The compile-time and run-time information should not contradict. In other words, n should equal N unless N is Dynamic.

Example:

Output:

block(Index,Index,NRowsType,NColsType), class Block

◆ leftCols() [2/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstNColsBlockXpr< N >::Type leftCols ( Index  n = N) const

This is the const version of leftCols<int>().

◆ leftCols() [3/4]

template<typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type leftCols ( NColsType  n)
Returns
a block consisting of the left columns of *this.
Parameters
nthe number of columns in the block
Template Parameters
NColsTypethe type of the value handling the number of columns in the block, typically Index.

Example:

Output:

The number of columns n can also be specified at compile-time by passing Eigen::fix<N>, or Eigen::fix<N>(n) as arguments. See block() for the details.

See also
block(Index,Index,NRowsType,NColsType), class Block

◆ leftCols() [4/4]

template<typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstNColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type leftCols ( NColsType  n) const

This is the const version of leftCols(NColsType).

◆ middleCols() [1/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NColsBlockXpr< N >::Type middleCols ( Index  startCol,
Index  n = N 
)
Returns
a block consisting of a range of columns of *this.
Template Parameters
Nthe number of columns in the block as specified at compile-time
Parameters
startColthe index of the first column in the block
nthe number of columns in the block as specified at run-time

The compile-time and run-time information should not contradict. In other words, n should equal N unless N is Dynamic.

Example:

Output:

block(Index,Index,NRowsType,NColsType), class Block

◆ middleCols() [2/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstNColsBlockXpr< N >::Type middleCols ( Index  startCol,
Index  n = N 
) const

This is the const version of middleCols<int>().

◆ middleCols() [3/4]

template<typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type middleCols ( Index  startCol,
NColsType  numCols 
)
Returns
a block consisting of a range of columns of *this.
Parameters
startColthe index of the first column in the block
numColsthe number of columns in the block
Template Parameters
NColsTypethe type of the value handling the number of columns in the block, typically Index.

Example:

Output:

The number of columns n can also be specified at compile-time by passing Eigen::fix<N>, or Eigen::fix<N>(n) as arguments. See block() for the details.

See also
block(Index,Index,NRowsType,NColsType), class Block

◆ middleCols() [4/4]

template<typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstNColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type middleCols ( Index  startCol,
NColsType  numCols 
) const

This is the const version of middleCols(Index,NColsType).

◆ middleRows() [1/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< N >::Type middleRows ( Index  startRow,
Index  n = N 
)
Returns
a block consisting of a range of rows of *this.
Template Parameters
Nthe number of rows in the block as specified at compile-time
Parameters
startRowthe index of the first row in the block
nthe number of rows in the block as specified at run-time

The compile-time and run-time information should not contradict. In other words, n should equal N unless N is Dynamic.

Example:

Output:

block(Index,Index,NRowsType,NColsType), class Block

◆ middleRows() [2/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstNRowsBlockXpr< N >::Type middleRows ( Index  startRow,
Index  n = N 
) const

This is the const version of middleRows<int>().

◆ middleRows() [3/4]

template<typename NRowsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type middleRows ( Index  startRow,
NRowsType  n 
)
Returns
a block consisting of a range of rows of *this.
Parameters
startRowthe index of the first row in the block
nthe number of rows in the block
Template Parameters
NRowsTypethe type of the value handling the number of rows in the block, typically Index.

Example:

Output:

The number of rows n can also be specified at compile-time by passing Eigen::fix<N>, or Eigen::fix<N>(n) as arguments. See block() for the details.

See also
block(Index,Index,NRowsType,NColsType), class Block

◆ middleRows() [4/4]

template<typename NRowsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstNRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type middleRows ( Index  startRow,
NRowsType  n 
) const

This is the const version of middleRows(Index,NRowsType).

◆ rightCols() [1/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NColsBlockXpr< N >::Type rightCols ( Index  n = N)
Returns
a block consisting of the right columns of *this.
Template Parameters
Nthe number of columns in the block as specified at compile-time
Parameters
nthe number of columns in the block as specified at run-time

The compile-time and run-time information should not contradict. In other words, n should equal N unless N is Dynamic.

Example:

Output:

block(Index,Index,NRowsType,NColsType), class Block

◆ rightCols() [2/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstNColsBlockXpr< N >::Type rightCols ( Index  n = N) const

This is the const version of rightCols<int>().

◆ rightCols() [3/4]

template<typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type rightCols ( NColsType  n)
Returns
a block consisting of the right columns of *this.
Parameters
nthe number of columns in the block
Template Parameters
NColsTypethe type of the value handling the number of columns in the block, typically Index.

Example:

Output:

The number of columns n can also be specified at compile-time by passing Eigen::fix<N>, or Eigen::fix<N>(n) as arguments. See block() for the details.

See also
block(Index,Index,NRowsType,NColsType), class Block

◆ rightCols() [4/4]

template<typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstNColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type rightCols ( NColsType  n) const

This is the const version of rightCols(NColsType).

◆ row()

This is the const version of row(). *‍/.

Returns
an expression of the i-th row of *this. Note that the numbering starts at 0.

Example:

Output:

col(), class Block

◆ segment() [1/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedSegmentReturnType< N >::Type segment ( Index  start,
Index  n = N 
)
Returns
a fixed-size expression of a segment (i.e. a vector block) in *this

\only_for_vectors

Template Parameters
Nthe number of coefficients in the segment as specified at compile-time
Parameters
startthe index of the first element in the segment
nthe number of coefficients in the segment as specified at compile-time

The compile-time and run-time information should not contradict. In other words, n should equal N unless N is Dynamic.

Example:

Output:

See also
segment(Index,NType), class Block

◆ segment() [2/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstFixedSegmentReturnType< N >::Type segment ( Index  start,
Index  n = N 
) const

This is the const version of segment<int>(Index).

◆ segment() [3/4]

template<typename NType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedSegmentReturnType< internal::get_fixed_value< NType >::value >::Type segment ( Index  start,
NType  n 
)
Returns
an expression of a segment (i.e. a vector block) in *this with either dynamic or fixed sizes.

\only_for_vectors

Parameters
startthe first coefficient in the segment
nthe number of coefficients in the segment
Template Parameters
NTypethe type of the value handling the number of coefficients in the segment, typically Index.

Example:

Output:

The number of coefficients n can also be specified at compile-time by passing Eigen::fix<N>, or Eigen::fix<N>(n) as arguments. See block() for the details.

Note
Even in the case that the returned expression has dynamic size, in the case when it is applied to a fixed-size vector, it inherits a fixed maximal size, which means that evaluating it does not cause a dynamic memory allocation.
See also
block(Index,Index,NRowsType,NColsType), fix<N>, fix<N>(int), class Block

◆ segment() [4/4]

template<typename NType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedSegmentReturnType< internal::get_fixed_value< NType >::value >::Type segment ( Index  start,
NType  n 
) const

This is the const version of segment(Index,NType).

◆ subVector() [1/2]

template<DirectionType Direction>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::conditional< Direction==Vertical, ColXpr, RowXpr >::type subVector ( Index  i)
Returns
the i-th subvector (column or vector) according to the Direction
See also
subVectors()

◆ subVector() [2/2]

template<DirectionType Direction>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::conditional< Direction==Vertical, ConstColXpr, ConstRowXpr >::type subVector ( Index  i) const

This is the const version of subVector(Index)

◆ subVectors()

template<DirectionType Direction>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index subVectors ( ) const
Returns
the number of subvectors (rows or columns) in the direction Direction
See also
subVector(Index)

◆ tail() [1/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedSegmentReturnType< N >::Type tail ( Index  n = N)
Returns
a fixed-size expression of the last coefficients of *this.

\only_for_vectors

Template Parameters
Nthe number of coefficients in the segment as specified at compile-time
Parameters
nthe number of coefficients in the segment as specified at run-time

The compile-time and run-time information should not contradict. In other words, n should equal N unless N is Dynamic.

Example:

Output:

See also
tail(NType), class Block

◆ tail() [2/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstFixedSegmentReturnType< N >::Type tail ( Index  n = N) const

This is the const version of tail<int>.

◆ tail() [3/4]

template<typename NType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedSegmentReturnType< internal::get_fixed_value< NType >::value >::Type tail ( NType  n)
Returns
an expression of a last coefficients of *this with either dynamic or fixed sizes.

\only_for_vectors

Parameters
nthe number of coefficients in the segment
Template Parameters
NTypethe type of the value handling the number of coefficients in the segment, typically Index.

Example:

Output:

The number of coefficients n can also be specified at compile-time by passing Eigen::fix<N>, or Eigen::fix<N>(n) as arguments. See block() for the details.

Note
Even in the case that the returned expression has dynamic size, in the case when it is applied to a fixed-size vector, it inherits a fixed maximal size, which means that evaluating it does not cause a dynamic memory allocation.
See also
class Block, block(Index,Index)

◆ tail() [4/4]

template<typename NType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedSegmentReturnType< internal::get_fixed_value< NType >::value >::Type tail ( NType  n) const

This is the const version of tail(Index).

◆ topLeftCorner() [1/6]

template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type topLeftCorner ( )
Returns
an expression of a fixed-size top-left corner of *this.

The template parameters CRows and CCols are the number of rows and columns in the corner.

Example:

Output:

block(Index,Index,NRowsType,NColsType), class Block

◆ topLeftCorner() [2/6]

template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type topLeftCorner ( ) const

This is the const version of topLeftCorner<int, int>().

◆ topLeftCorner() [3/6]

template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type topLeftCorner ( Index  cRows,
Index  cCols 
)
Returns
an expression of a top-left corner of *this.
Template Parameters
CRowsnumber of rows in corner as specified at compile-time
CColsnumber of columns in corner as specified at compile-time
Parameters
cRowsnumber of rows in corner as specified at run-time
cColsnumber of columns in corner as specified at run-time

This function is mainly useful for corners where the number of rows is specified at compile-time and the number of columns is specified at run-time, or vice versa. The compile-time and run-time information should not contradict. In other words, cRows should equal CRows unless CRows is Dynamic, and the same for the number of columns.

Example:

Output:

class Block

◆ topLeftCorner() [4/6]

template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type topLeftCorner ( Index  cRows,
Index  cCols 
) const

This is the const version of topLeftCorner<int, int>(Index, Index).

◆ topLeftCorner() [5/6]

template<typename NRowsType , typename NColsType >
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type topLeftCorner ( NRowsType  cRows,
NColsType  cCols 
)
Returns
an expression of a top-left corner of *this with either dynamic or fixed sizes.
Parameters
cRowsthe number of rows in the corner
cColsthe number of columns in the corner
Template Parameters
NRowsTypethe type of the value handling the number of rows in the block, typically Index.
NColsTypethe type of the value handling the number of columns in the block, typically Index.

Example:

Output:

The number of rows blockRows and columns blockCols can also be specified at compile-time by passing Eigen::fix<N>, or Eigen::fix<N>(n) as arguments. See block() for the details.

See also
block(Index,Index,NRowsType,NColsType), class Block

◆ topLeftCorner() [6/6]

template<typename NRowsType , typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type topLeftCorner ( NRowsType  cRows,
NColsType  cCols 
) const

This is the const version of topLeftCorner(Index, Index).

◆ topRightCorner() [1/6]

template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type topRightCorner ( )
Returns
an expression of a fixed-size top-right corner of *this.
Template Parameters
CRowsthe number of rows in the corner
CColsthe number of columns in the corner

Example:

Output:

class Block, block<int,int>(Index,Index)

◆ topRightCorner() [2/6]

template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type topRightCorner ( ) const

This is the const version of topRightCorner<int, int>().

◆ topRightCorner() [3/6]

template<int CRows, int CCols>
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< CRows, CCols >::Type topRightCorner ( Index  cRows,
Index  cCols 
)
Returns
an expression of a top-right corner of *this.
Template Parameters
CRowsnumber of rows in corner as specified at compile-time
CColsnumber of columns in corner as specified at compile-time
Parameters
cRowsnumber of rows in corner as specified at run-time
cColsnumber of columns in corner as specified at run-time

This function is mainly useful for corners where the number of rows is specified at compile-time and the number of columns is specified at run-time, or vice versa. The compile-time and run-time information should not contradict. In other words, cRows should equal CRows unless CRows is Dynamic, and the same for the number of columns.

Example:

Output:

class Block

◆ topRightCorner() [4/6]

template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< CRows, CCols >::Type topRightCorner ( Index  cRows,
Index  cCols 
) const

This is the const version of topRightCorner<int, int>(Index, Index).

◆ topRightCorner() [5/6]

template<typename NRowsType , typename NColsType >
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type topRightCorner ( NRowsType  cRows,
NColsType  cCols 
)
Returns
a expression of a top-right corner of *this with either dynamic or fixed sizes.
Parameters
cRowsthe number of rows in the corner
cColsthe number of columns in the corner
Template Parameters
NRowsTypethe type of the value handling the number of rows in the block, typically Index.
NColsTypethe type of the value handling the number of columns in the block, typically Index.

Example with dynamic sizes:

Output:

The number of rows blockRows and columns blockCols can also be specified at compile-time by passing Eigen::fix<N>, or Eigen::fix<N>(n) as arguments. See block() for the details.

See also
block(Index,Index,NRowsType,NColsType), class Block

◆ topRightCorner() [6/6]

template<typename NRowsType , typename NColsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstFixedBlockXpr< internal::get_fixed_value< NRowsType >::value, internal::get_fixed_value< NColsType >::value >::Type topRightCorner ( NRowsType  cRows,
NColsType  cCols 
) const

This is the const version of topRightCorner(NRowsType, NColsType).

◆ topRows() [1/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< N >::Type topRows ( Index  n = N)
Returns
a block consisting of the top rows of *this.
Template Parameters
Nthe number of rows in the block as specified at compile-time
Parameters
nthe number of rows in the block as specified at run-time

The compile-time and run-time information should not contradict. In other words, n should equal N unless N is Dynamic.

Example:

Output:

block(Index,Index,NRowsType,NColsType), class Block

◆ topRows() [2/4]

template<int N>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstNRowsBlockXpr< N >::Type topRows ( Index  n = N) const

This is the const version of topRows<int>().

◆ topRows() [3/4]

template<typename NRowsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type topRows ( NRowsType  n)
Returns
a block consisting of the top rows of *this.
Parameters
nthe number of rows in the block
Template Parameters
NRowsTypethe type of the value handling the number of rows in the block, typically Index.

Example:

Output:

The number of rows n can also be specified at compile-time by passing Eigen::fix<N>, or Eigen::fix<N>(n) as arguments. See block() for the details.

See also
block(Index,Index,NRowsType,NColsType), class Block

◆ topRows() [4/4]

template<typename NRowsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ConstNRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type topRows ( NRowsType  n) const

This is the const version of topRows(NRowsType).