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;
40 template<
int Size>
struct FixedSegmentReturnType {
typedef VectorBlock<Derived, Size> Type; };
41 template<
int Size>
struct ConstFixedSegmentReturnType {
typedef const VectorBlock<const Derived, Size> Type; };
43 #endif // not EIGEN_PARSED_BY_DOXYGEN 62 inline BlockXpr block(Index startRow, Index startCol, Index blockRows, Index blockCols)
64 return BlockXpr(derived(), startRow, startCol, blockRows, blockCols);
69 inline const ConstBlockXpr block(Index startRow, Index startCol, Index blockRows, Index blockCols)
const 71 return ConstBlockXpr(derived(), startRow, startCol, blockRows, blockCols);
88 inline BlockXpr topRightCorner(Index cRows, Index cCols)
90 return BlockXpr(derived(), 0, cols() - cCols, cRows, cCols);
95 inline const ConstBlockXpr topRightCorner(Index cRows, Index cCols)
const 97 return ConstBlockXpr(derived(), 0, cols() - cCols, cRows, cCols);
110 template<
int CRows,
int CCols>
112 inline typename FixedBlockXpr<CRows,CCols>::Type topRightCorner()
114 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols);
118 template<
int CRows,
int CCols>
120 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner()
const 122 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols);
142 template<
int CRows,
int CCols>
143 inline typename FixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols)
145 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
149 template<
int CRows,
int CCols>
150 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols)
const 152 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
168 inline BlockXpr topLeftCorner(Index cRows, Index cCols)
170 return BlockXpr(derived(), 0, 0, cRows, cCols);
175 inline const ConstBlockXpr topLeftCorner(Index cRows, Index cCols)
const 177 return ConstBlockXpr(derived(), 0, 0, cRows, cCols);
189 template<
int CRows,
int CCols>
191 inline typename FixedBlockXpr<CRows,CCols>::Type topLeftCorner()
193 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0);
197 template<
int CRows,
int CCols>
199 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner()
const 201 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0);
221 template<
int CRows,
int CCols>
222 inline typename FixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols)
224 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols);
228 template<
int CRows,
int CCols>
229 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols)
const 231 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols);
247 inline BlockXpr bottomRightCorner(Index cRows, Index cCols)
249 return BlockXpr(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
254 inline const ConstBlockXpr bottomRightCorner(Index cRows, Index cCols)
const 256 return ConstBlockXpr(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
268 template<
int CRows,
int CCols>
270 inline typename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner()
272 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols);
276 template<
int CRows,
int CCols>
278 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner()
const 280 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols);
300 template<
int CRows,
int CCols>
301 inline typename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols)
303 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
307 template<
int CRows,
int CCols>
308 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols)
const 310 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
326 inline BlockXpr bottomLeftCorner(Index cRows, Index cCols)
328 return BlockXpr(derived(), rows() - cRows, 0, cRows, cCols);
333 inline const ConstBlockXpr bottomLeftCorner(Index cRows, Index cCols)
const 335 return ConstBlockXpr(derived(), rows() - cRows, 0, cRows, cCols);
347 template<
int CRows,
int CCols>
349 inline typename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner()
351 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0);
355 template<
int CRows,
int CCols>
357 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner()
const 359 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0);
379 template<
int CRows,
int CCols>
380 inline typename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols)
382 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
386 template<
int CRows,
int CCols>
387 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols)
const 389 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
404 inline RowsBlockXpr topRows(Index n)
406 return RowsBlockXpr(derived(), 0, 0, n, cols());
411 inline ConstRowsBlockXpr topRows(Index n)
const 413 return ConstRowsBlockXpr(derived(), 0, 0, n, cols());
431 inline typename NRowsBlockXpr<N>::Type topRows(Index n = N)
433 return typename NRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
439 inline typename ConstNRowsBlockXpr<N>::Type topRows(Index n = N)
const 441 return typename ConstNRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
456 inline RowsBlockXpr bottomRows(Index n)
458 return RowsBlockXpr(derived(), rows() - n, 0, n, cols());
463 inline ConstRowsBlockXpr bottomRows(Index n)
const 465 return ConstRowsBlockXpr(derived(), rows() - n, 0, n, cols());
483 inline typename NRowsBlockXpr<N>::Type bottomRows(Index n = N)
485 return typename NRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
491 inline typename ConstNRowsBlockXpr<N>::Type bottomRows(Index n = N)
const 493 return typename ConstNRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
509 inline RowsBlockXpr middleRows(Index startRow, Index n)
511 return RowsBlockXpr(derived(), startRow, 0, n, cols());
516 inline ConstRowsBlockXpr middleRows(Index startRow, Index n)
const 518 return ConstRowsBlockXpr(derived(), startRow, 0, n, cols());
537 inline typename NRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N)
539 return typename NRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
545 inline typename ConstNRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N)
const 547 return typename ConstNRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
562 inline ColsBlockXpr leftCols(Index n)
564 return ColsBlockXpr(derived(), 0, 0, rows(), n);
569 inline ConstColsBlockXpr leftCols(Index n)
const 571 return ConstColsBlockXpr(derived(), 0, 0, rows(), n);
589 inline typename NColsBlockXpr<N>::Type leftCols(Index n = N)
591 return typename NColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
597 inline typename ConstNColsBlockXpr<N>::Type leftCols(Index n = N)
const 599 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
614 inline ColsBlockXpr rightCols(Index n)
616 return ColsBlockXpr(derived(), 0, cols() - n, rows(), n);
621 inline ConstColsBlockXpr rightCols(Index n)
const 623 return ConstColsBlockXpr(derived(), 0, cols() - n, rows(), n);
641 inline typename NColsBlockXpr<N>::Type rightCols(Index n = N)
643 return typename NColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
649 inline typename ConstNColsBlockXpr<N>::Type rightCols(Index n = N)
const 651 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
667 inline ColsBlockXpr middleCols(Index startCol, Index numCols)
669 return ColsBlockXpr(derived(), 0, startCol, rows(), numCols);
674 inline ConstColsBlockXpr middleCols(Index startCol, Index numCols)
const 676 return ConstColsBlockXpr(derived(), 0, startCol, rows(), numCols);
695 inline typename NColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N)
697 return typename NColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
703 inline typename ConstNColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N)
const 705 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
726 template<
int NRows,
int NCols>
728 inline typename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol)
730 return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol);
734 template<
int NRows,
int NCols>
736 inline const typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol)
const 738 return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol);
760 template<
int NRows,
int NCols>
761 inline typename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol,
762 Index blockRows, Index blockCols)
764 return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
768 template<
int NRows,
int NCols>
769 inline const typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol,
770 Index blockRows, Index blockCols)
const 772 return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
782 inline ColXpr col(Index i)
784 return ColXpr(derived(), i);
789 inline ConstColXpr col(Index i)
const 791 return ConstColXpr(derived(), i);
801 inline RowXpr row(Index i)
803 return RowXpr(derived(), i);
808 inline ConstRowXpr row(Index i)
const 810 return ConstRowXpr(derived(), i);
830 inline SegmentReturnType segment(Index start, Index n)
832 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
833 return SegmentReturnType(derived(), start, n);
839 inline ConstSegmentReturnType segment(Index start, Index n)
const 841 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
842 return ConstSegmentReturnType(derived(), start, n);
861 inline SegmentReturnType head(Index n)
863 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
864 return SegmentReturnType(derived(), 0, n);
869 inline ConstSegmentReturnType head(Index n)
const 871 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
872 return ConstSegmentReturnType(derived(), 0, n);
891 inline SegmentReturnType tail(Index n)
893 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
894 return SegmentReturnType(derived(), this->size() - n, n);
899 inline ConstSegmentReturnType tail(Index n)
const 901 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
902 return ConstSegmentReturnType(derived(), this->size() - n, n);
923 inline typename FixedSegmentReturnType<N>::Type segment(Index start, Index n = N)
925 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
926 return typename FixedSegmentReturnType<N>::Type(derived(), start, n);
932 inline typename ConstFixedSegmentReturnType<N>::Type segment(Index start, Index n = N)
const 934 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
935 return typename ConstFixedSegmentReturnType<N>::Type(derived(), start, n);
955 inline typename FixedSegmentReturnType<N>::Type head(Index n = N)
957 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
958 return typename FixedSegmentReturnType<N>::Type(derived(), 0, n);
964 inline typename ConstFixedSegmentReturnType<N>::Type head(Index n = N)
const 966 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
967 return typename ConstFixedSegmentReturnType<N>::Type(derived(), 0, n);
987 inline typename FixedSegmentReturnType<N>::Type tail(Index n = N)
989 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
990 return typename FixedSegmentReturnType<N>::Type(derived(), size() - n);
996 inline typename ConstFixedSegmentReturnType<N>::Type tail(Index n = N)
const 998 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
999 return typename ConstFixedSegmentReturnType<N>::Type(derived(), size() - n);
const int Dynamic
Definition: Constants.h:21