11 #ifndef EIGEN_PARSED_BY_DOXYGEN 14 typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ColXpr;
15 typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ConstColXpr;
17 typedef Block<Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowXpr;
18 typedef const Block<const Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowXpr;
20 typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime,
Dynamic, !IsRowMajor>
ColsBlockXpr;
21 typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime,
Dynamic, !IsRowMajor> ConstColsBlockXpr;
23 typedef Block<Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowsBlockXpr;
24 typedef const Block<const Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowsBlockXpr;
26 template<
int N>
struct NColsBlockXpr {
typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type; };
27 template<
int N>
struct ConstNColsBlockXpr {
typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type; };
29 template<
int N>
struct NRowsBlockXpr {
typedef Block<Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type; };
30 template<
int N>
struct ConstNRowsBlockXpr {
typedef const Block<const Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type; };
32 typedef Block<Derived> BlockXpr;
33 typedef const Block<const Derived> ConstBlockXpr;
35 template<
int Rows,
int Cols>
struct FixedBlockXpr {
typedef Block<Derived,Rows,Cols> Type; };
36 template<
int Rows,
int Cols>
struct ConstFixedBlockXpr {
typedef Block<const Derived,Rows,Cols> Type; };
38 typedef VectorBlock<Derived> SegmentReturnType;
39 typedef const VectorBlock<const Derived> ConstSegmentReturnType;
43 #endif // not EIGEN_PARSED_BY_DOXYGEN 59 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
64 inline BlockXpr block(Index startRow, Index startCol, Index blockRows, Index blockCols)
66 return BlockXpr(derived(), startRow, startCol, blockRows, blockCols);
71 inline const ConstBlockXpr block(Index startRow, Index startCol, Index blockRows, Index blockCols)
const 73 return ConstBlockXpr(derived(), startRow, startCol, blockRows, blockCols);
87 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
92 inline BlockXpr topRightCorner(Index cRows, Index cCols)
94 return BlockXpr(derived(), 0, cols() - cCols, cRows, cCols);
99 inline const ConstBlockXpr topRightCorner(Index cRows, Index cCols)
const 101 return ConstBlockXpr(derived(), 0, cols() - cCols, cRows, cCols);
112 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
116 template<
int CRows,
int CCols>
118 inline typename FixedBlockXpr<CRows,CCols>::Type topRightCorner()
120 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols);
124 template<
int CRows,
int CCols>
126 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner()
const 128 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols);
146 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
150 template<
int CRows,
int CCols>
151 inline typename FixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols)
153 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
157 template<
int CRows,
int CCols>
158 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols)
const 160 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
173 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
178 inline BlockXpr topLeftCorner(Index cRows, Index cCols)
180 return BlockXpr(derived(), 0, 0, cRows, cCols);
185 inline const ConstBlockXpr topLeftCorner(Index cRows, Index cCols)
const 187 return ConstBlockXpr(derived(), 0, 0, cRows, cCols);
197 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
201 template<
int CRows,
int CCols>
203 inline typename FixedBlockXpr<CRows,CCols>::Type topLeftCorner()
205 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0);
209 template<
int CRows,
int CCols>
211 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner()
const 213 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0);
231 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
235 template<
int CRows,
int CCols>
236 inline typename FixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols)
238 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols);
242 template<
int CRows,
int CCols>
243 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols)
const 245 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols);
258 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
263 inline BlockXpr bottomRightCorner(Index cRows, Index cCols)
265 return BlockXpr(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
270 inline const ConstBlockXpr bottomRightCorner(Index cRows, Index cCols)
const 272 return ConstBlockXpr(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
282 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
286 template<
int CRows,
int CCols>
288 inline typename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner()
290 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols);
294 template<
int CRows,
int CCols>
296 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner()
const 298 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols);
316 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
320 template<
int CRows,
int CCols>
321 inline typename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols)
323 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
327 template<
int CRows,
int CCols>
328 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols)
const 330 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
343 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
348 inline BlockXpr bottomLeftCorner(Index cRows, Index cCols)
350 return BlockXpr(derived(), rows() - cRows, 0, cRows, cCols);
355 inline const ConstBlockXpr bottomLeftCorner(Index cRows, Index cCols)
const 357 return ConstBlockXpr(derived(), rows() - cRows, 0, cRows, cCols);
367 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
371 template<
int CRows,
int CCols>
373 inline typename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner()
375 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0);
379 template<
int CRows,
int CCols>
381 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner()
const 383 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0);
401 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
405 template<
int CRows,
int CCols>
406 inline typename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols)
408 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
412 template<
int CRows,
int CCols>
413 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols)
const 415 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
427 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
432 inline RowsBlockXpr topRows(Index n)
434 return RowsBlockXpr(derived(), 0, 0, n, cols());
439 inline ConstRowsBlockXpr topRows(Index n)
const 441 return ConstRowsBlockXpr(derived(), 0, 0, n, cols());
455 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
461 inline typename NRowsBlockXpr<N>::Type topRows(Index n = N)
463 return typename NRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
469 inline typename ConstNRowsBlockXpr<N>::Type topRows(Index n = N)
const 471 return typename ConstNRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
483 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
488 inline RowsBlockXpr bottomRows(Index n)
490 return RowsBlockXpr(derived(), rows() - n, 0, n, cols());
495 inline ConstRowsBlockXpr bottomRows(Index n)
const 497 return ConstRowsBlockXpr(derived(), rows() - n, 0, n, cols());
511 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
517 inline typename NRowsBlockXpr<N>::Type bottomRows(Index n = N)
519 return typename NRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
525 inline typename ConstNRowsBlockXpr<N>::Type bottomRows(Index n = N)
const 527 return typename ConstNRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
540 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
545 inline RowsBlockXpr middleRows(Index startRow, Index n)
547 return RowsBlockXpr(derived(), startRow, 0, n, cols());
552 inline ConstRowsBlockXpr middleRows(Index startRow, Index n)
const 554 return ConstRowsBlockXpr(derived(), startRow, 0, n, cols());
569 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
575 inline typename NRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N)
577 return typename NRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
583 inline typename ConstNRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N)
const 585 return typename ConstNRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
597 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
609 inline ConstColsBlockXpr leftCols(Index n)
const 611 return ConstColsBlockXpr(derived(), 0, 0, rows(), n);
625 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
631 inline typename NColsBlockXpr<N>::Type leftCols(Index n = N)
633 return typename NColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
639 inline typename ConstNColsBlockXpr<N>::Type leftCols(Index n = N)
const 641 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
653 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
660 return ColsBlockXpr(derived(), 0, cols() - n, rows(), n);
665 inline ConstColsBlockXpr rightCols(Index n)
const 667 return ConstColsBlockXpr(derived(), 0, cols() - n, rows(), n);
681 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
687 inline typename NColsBlockXpr<N>::Type rightCols(Index n = N)
689 return typename NColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
695 inline typename ConstNColsBlockXpr<N>::Type rightCols(Index n = N)
const 697 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
710 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
715 inline ColsBlockXpr middleCols(Index startCol, Index numCols)
717 return ColsBlockXpr(derived(), 0, startCol, rows(), numCols);
722 inline ConstColsBlockXpr middleCols(Index startCol, Index numCols)
const 724 return ConstColsBlockXpr(derived(), 0, startCol, rows(), numCols);
739 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
745 inline typename NColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N)
747 return typename NColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
753 inline typename ConstNColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N)
const 755 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
774 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
778 template<
int NRows,
int NCols>
780 inline typename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol)
782 return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol);
786 template<
int NRows,
int NCols>
788 inline const typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol)
const 790 return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol);
810 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
814 template<
int NRows,
int NCols>
815 inline typename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol,
816 Index blockRows, Index blockCols)
818 return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
822 template<
int NRows,
int NCols>
823 inline const typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol,
824 Index blockRows, Index blockCols)
const 826 return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
834 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
838 inline ColXpr col(Index i)
840 return ColXpr(derived(), i);
845 inline ConstColXpr col(Index i)
const 847 return ConstColXpr(derived(), i);
855 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
859 inline RowXpr row(Index i)
861 return RowXpr(derived(), i);
866 inline ConstRowXpr row(Index i)
const 868 return ConstRowXpr(derived(), i);
888 inline SegmentReturnType segment(Index start, Index n)
890 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
891 return SegmentReturnType(derived(), start, n);
897 inline ConstSegmentReturnType segment(Index start, Index n)
const 899 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
900 return ConstSegmentReturnType(derived(), start, n);
919 inline SegmentReturnType head(Index n)
921 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
922 return SegmentReturnType(derived(), 0, n);
927 inline ConstSegmentReturnType head(Index n)
const 929 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
930 return ConstSegmentReturnType(derived(), 0, n);
949 inline SegmentReturnType tail(Index n)
951 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
952 return SegmentReturnType(derived(), this->size() - n, n);
957 inline ConstSegmentReturnType tail(Index n)
const 959 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
960 return ConstSegmentReturnType(derived(), this->size() - n, n);
981 inline typename FixedSegmentReturnType<N>::Type segment(Index start, Index n = N)
983 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
984 return typename FixedSegmentReturnType<N>::Type(derived(), start, n);
990 inline typename ConstFixedSegmentReturnType<N>::Type segment(Index start, Index n = N)
const 992 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
993 return typename ConstFixedSegmentReturnType<N>::Type(derived(), start, n);
1013 inline typename FixedSegmentReturnType<N>::Type head(Index n = N)
1015 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1016 return typename FixedSegmentReturnType<N>::Type(derived(), 0, n);
1022 inline typename ConstFixedSegmentReturnType<N>::Type head(Index n = N)
const 1024 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1025 return typename ConstFixedSegmentReturnType<N>::Type(derived(), 0, n);
1045 inline typename FixedSegmentReturnType<N>::Type tail(Index n = N)
1047 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1048 return typename FixedSegmentReturnType<N>::Type(derived(), size() - n);
1054 inline typename ConstFixedSegmentReturnType<N>::Type tail(Index n = N)
const 1056 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1057 return typename ConstFixedSegmentReturnType<N>::Type(derived(), size() - n);
Definition: BlockMethods.h:35
Definition: BlockMethods.h:40
Definition: BlockMethods.h:30
Definition: BlockMethods.h:41
Definition: BlockMethods.h:36
Definition: BlockMethods.h:27
Definition: BlockMethods.h:26
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:103
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time, and that instead the value is stored in some runtime variable.
Definition: Constants.h:21
Definition: BlockMethods.h:29