12 #ifndef EIGEN_PARSED_BY_DOXYGEN 15 typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ColXpr;
16 typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ConstColXpr;
18 typedef Block<Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowXpr;
19 typedef const Block<const Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowXpr;
21 typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ColsBlockXpr;
22 typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ConstColsBlockXpr;
24 typedef Block<Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowsBlockXpr;
25 typedef const Block<const Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowsBlockXpr;
27 template<
int N>
struct NColsBlockXpr {
typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type; };
28 template<
int N>
struct ConstNColsBlockXpr {
typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type; };
30 template<
int N>
struct NRowsBlockXpr {
typedef Block<Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type; };
31 template<
int N>
struct ConstNRowsBlockXpr {
typedef const Block<const Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type; };
33 typedef VectorBlock<Derived> SegmentReturnType;
34 typedef const VectorBlock<const Derived> ConstSegmentReturnType;
35 template<
int Size>
struct FixedSegmentReturnType {
typedef VectorBlock<Derived, Size> Type; };
36 template<
int Size>
struct ConstFixedSegmentReturnType {
typedef const VectorBlock<const Derived, Size> Type; };
38 #endif // not EIGEN_PARSED_BY_DOXYGEN 57 inline Block<Derived> block(Index startRow, Index startCol, Index blockRows, Index blockCols)
59 return Block<Derived>(derived(), startRow, startCol, blockRows, blockCols);
64 inline const Block<const Derived> block(Index startRow, Index startCol, Index blockRows, Index blockCols)
const 66 return Block<const Derived>(derived(), startRow, startCol, blockRows, blockCols);
83 inline Block<Derived> topRightCorner(Index cRows, Index cCols)
85 return Block<Derived>(derived(), 0, cols() - cCols, cRows, cCols);
90 inline const Block<const Derived> topRightCorner(Index cRows, Index cCols)
const 92 return Block<const Derived>(derived(), 0, cols() - cCols, cRows, cCols);
105 template<
int CRows,
int CCols>
107 inline Block<Derived, CRows, CCols> topRightCorner()
109 return Block<Derived, CRows, CCols>(derived(), 0, cols() - CCols);
113 template<
int CRows,
int CCols>
115 inline const Block<const Derived, CRows, CCols> topRightCorner()
const 117 return Block<const Derived, CRows, CCols>(derived(), 0, cols() - CCols);
137 template<
int CRows,
int CCols>
138 inline Block<Derived, CRows, CCols> topRightCorner(Index cRows, Index cCols)
140 return Block<Derived, CRows, CCols>(derived(), 0, cols() - cCols, cRows, cCols);
144 template<
int CRows,
int CCols>
145 inline const Block<const Derived, CRows, CCols> topRightCorner(Index cRows, Index cCols)
const 147 return Block<const Derived, CRows, CCols>(derived(), 0, cols() - cCols, cRows, cCols);
163 inline Block<Derived> topLeftCorner(Index cRows, Index cCols)
165 return Block<Derived>(derived(), 0, 0, cRows, cCols);
170 inline const Block<const Derived> topLeftCorner(Index cRows, Index cCols)
const 172 return Block<const Derived>(derived(), 0, 0, cRows, cCols);
184 template<
int CRows,
int CCols>
186 inline Block<Derived, CRows, CCols> topLeftCorner()
188 return Block<Derived, CRows, CCols>(derived(), 0, 0);
192 template<
int CRows,
int CCols>
194 inline const Block<const Derived, CRows, CCols> topLeftCorner()
const 196 return Block<const Derived, CRows, CCols>(derived(), 0, 0);
216 template<
int CRows,
int CCols>
217 inline Block<Derived, CRows, CCols> topLeftCorner(Index cRows, Index cCols)
219 return Block<Derived, CRows, CCols>(derived(), 0, 0, cRows, cCols);
223 template<
int CRows,
int CCols>
224 inline const Block<const Derived, CRows, CCols> topLeftCorner(Index cRows, Index cCols)
const 226 return Block<const Derived, CRows, CCols>(derived(), 0, 0, cRows, cCols);
242 inline Block<Derived> bottomRightCorner(Index cRows, Index cCols)
244 return Block<Derived>(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
249 inline const Block<const Derived> bottomRightCorner(Index cRows, Index cCols)
const 251 return Block<const Derived>(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
263 template<
int CRows,
int CCols>
265 inline Block<Derived, CRows, CCols> bottomRightCorner()
267 return Block<Derived, CRows, CCols>(derived(), rows() - CRows, cols() - CCols);
271 template<
int CRows,
int CCols>
273 inline const Block<const Derived, CRows, CCols> bottomRightCorner()
const 275 return Block<const Derived, CRows, CCols>(derived(), rows() - CRows, cols() - CCols);
295 template<
int CRows,
int CCols>
296 inline Block<Derived, CRows, CCols> bottomRightCorner(Index cRows, Index cCols)
298 return Block<Derived, CRows, CCols>(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
302 template<
int CRows,
int CCols>
303 inline const Block<const Derived, CRows, CCols> bottomRightCorner(Index cRows, Index cCols)
const 305 return Block<const Derived, CRows, CCols>(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
321 inline Block<Derived> bottomLeftCorner(Index cRows, Index cCols)
323 return Block<Derived>(derived(), rows() - cRows, 0, cRows, cCols);
328 inline const Block<const Derived> bottomLeftCorner(Index cRows, Index cCols)
const 330 return Block<const Derived>(derived(), rows() - cRows, 0, cRows, cCols);
342 template<
int CRows,
int CCols>
344 inline Block<Derived, CRows, CCols> bottomLeftCorner()
346 return Block<Derived, CRows, CCols>(derived(), rows() - CRows, 0);
350 template<
int CRows,
int CCols>
352 inline const Block<const Derived, CRows, CCols> bottomLeftCorner()
const 354 return Block<const Derived, CRows, CCols>(derived(), rows() - CRows, 0);
374 template<
int CRows,
int CCols>
375 inline Block<Derived, CRows, CCols> bottomLeftCorner(Index cRows, Index cCols)
377 return Block<Derived, CRows, CCols>(derived(), rows() - cRows, 0, cRows, cCols);
381 template<
int CRows,
int CCols>
382 inline const Block<const Derived, CRows, CCols> bottomLeftCorner(Index cRows, Index cCols)
const 384 return Block<const Derived, CRows, CCols>(derived(), rows() - cRows, 0, cRows, cCols);
399 inline RowsBlockXpr topRows(Index n)
401 return RowsBlockXpr(derived(), 0, 0, n, cols());
406 inline ConstRowsBlockXpr topRows(Index n)
const 408 return ConstRowsBlockXpr(derived(), 0, 0, n, cols());
426 inline typename NRowsBlockXpr<N>::Type topRows(Index n = N)
428 return typename NRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
434 inline typename ConstNRowsBlockXpr<N>::Type topRows(Index n = N)
const 436 return typename ConstNRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
451 inline RowsBlockXpr bottomRows(Index n)
453 return RowsBlockXpr(derived(), rows() - n, 0, n, cols());
458 inline ConstRowsBlockXpr bottomRows(Index n)
const 460 return ConstRowsBlockXpr(derived(), rows() - n, 0, n, cols());
478 inline typename NRowsBlockXpr<N>::Type bottomRows(Index n = N)
480 return typename NRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
486 inline typename ConstNRowsBlockXpr<N>::Type bottomRows(Index n = N)
const 488 return typename ConstNRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
504 inline RowsBlockXpr middleRows(Index startRow, Index n)
506 return RowsBlockXpr(derived(), startRow, 0, n, cols());
511 inline ConstRowsBlockXpr middleRows(Index startRow, Index n)
const 513 return ConstRowsBlockXpr(derived(), startRow, 0, n, cols());
532 inline typename NRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N)
534 return typename NRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
540 inline typename ConstNRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N)
const 542 return typename ConstNRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
557 inline ColsBlockXpr leftCols(Index n)
559 return ColsBlockXpr(derived(), 0, 0, rows(), n);
564 inline ConstColsBlockXpr leftCols(Index n)
const 566 return ConstColsBlockXpr(derived(), 0, 0, rows(), n);
584 inline typename NColsBlockXpr<N>::Type leftCols(Index n = N)
586 return typename NColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
592 inline typename ConstNColsBlockXpr<N>::Type leftCols(Index n = N)
const 594 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
609 inline ColsBlockXpr rightCols(Index n)
611 return ColsBlockXpr(derived(), 0, cols() - n, rows(), n);
616 inline ConstColsBlockXpr rightCols(Index n)
const 618 return ConstColsBlockXpr(derived(), 0, cols() - n, rows(), n);
636 inline typename NColsBlockXpr<N>::Type rightCols(Index n = N)
638 return typename NColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
644 inline typename ConstNColsBlockXpr<N>::Type rightCols(Index n = N)
const 646 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
662 inline ColsBlockXpr middleCols(Index startCol, Index numCols)
664 return ColsBlockXpr(derived(), 0, startCol, rows(), numCols);
669 inline ConstColsBlockXpr middleCols(Index startCol, Index numCols)
const 671 return ConstColsBlockXpr(derived(), 0, startCol, rows(), numCols);
690 inline typename NColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N)
692 return typename NColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
698 inline typename ConstNColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N)
const 700 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
721 template<
int BlockRows,
int BlockCols>
723 inline Block<Derived, BlockRows, BlockCols> block(Index startRow, Index startCol)
725 return Block<Derived, BlockRows, BlockCols>(derived(), startRow, startCol);
729 template<
int BlockRows,
int BlockCols>
731 inline const Block<const Derived, BlockRows, BlockCols> block(Index startRow, Index startCol)
const 733 return Block<const Derived, BlockRows, BlockCols>(derived(), startRow, startCol);
755 template<
int BlockRows,
int BlockCols>
756 inline Block<Derived, BlockRows, BlockCols> block(Index startRow, Index startCol,
757 Index blockRows, Index blockCols)
759 return Block<Derived, BlockRows, BlockCols>(derived(), startRow, startCol, blockRows, blockCols);
763 template<
int BlockRows,
int BlockCols>
764 inline const Block<const Derived, BlockRows, BlockCols> block(Index startRow, Index startCol,
765 Index blockRows, Index blockCols)
const 767 return Block<const Derived, BlockRows, BlockCols>(derived(), startRow, startCol, blockRows, blockCols);
777 inline ColXpr col(Index i)
779 return ColXpr(derived(), i);
784 inline ConstColXpr col(Index i)
const 786 return ConstColXpr(derived(), i);
796 inline RowXpr row(Index i)
798 return RowXpr(derived(), i);
803 inline ConstRowXpr row(Index i)
const 805 return ConstRowXpr(derived(), i);
825 inline SegmentReturnType segment(Index start, Index n)
827 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
828 return SegmentReturnType(derived(), start, n);
834 inline ConstSegmentReturnType segment(Index start, Index n)
const 836 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
837 return ConstSegmentReturnType(derived(), start, n);
856 inline SegmentReturnType head(Index n)
858 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
859 return SegmentReturnType(derived(), 0, n);
864 inline ConstSegmentReturnType head(Index n)
const 866 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
867 return ConstSegmentReturnType(derived(), 0, n);
886 inline SegmentReturnType tail(Index n)
888 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
889 return SegmentReturnType(derived(), this->size() - n, n);
894 inline ConstSegmentReturnType tail(Index n)
const 896 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
897 return ConstSegmentReturnType(derived(), this->size() - n, n);
918 inline typename FixedSegmentReturnType<N>::Type segment(Index start, Index n = N)
920 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
921 return typename FixedSegmentReturnType<N>::Type(derived(), start, n);
927 inline typename ConstFixedSegmentReturnType<N>::Type segment(Index start, Index n = N)
const 929 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
930 return typename ConstFixedSegmentReturnType<N>::Type(derived(), start, n);
950 inline typename FixedSegmentReturnType<N>::Type head(Index n = N)
952 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
953 return typename FixedSegmentReturnType<N>::Type(derived(), 0, n);
959 inline typename ConstFixedSegmentReturnType<N>::Type head(Index n = N)
const 961 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
962 return typename ConstFixedSegmentReturnType<N>::Type(derived(), 0, n);
982 inline typename FixedSegmentReturnType<N>::Type tail(Index n = N)
984 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
985 return typename FixedSegmentReturnType<N>::Type(derived(), size() - n);
991 inline typename ConstFixedSegmentReturnType<N>::Type tail(Index n = N)
const 993 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
994 return typename ConstFixedSegmentReturnType<N>::Type(derived(), size() - n);