12#ifndef EIGEN_PARSED_BY_DOXYGEN
15typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ColXpr;
16typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ConstColXpr;
18typedef Block<Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowXpr;
19typedef const Block<const Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowXpr;
21typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ColsBlockXpr;
22typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ConstColsBlockXpr;
24typedef Block<Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowsBlockXpr;
25typedef const Block<const Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowsBlockXpr;
27template<
int N>
struct NColsBlockXpr {
typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type; };
28template<
int N>
struct ConstNColsBlockXpr {
typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type; };
30template<
int N>
struct NRowsBlockXpr {
typedef Block<Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type; };
31template<
int N>
struct ConstNRowsBlockXpr {
typedef const Block<const Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type; };
33typedef VectorBlock<Derived> SegmentReturnType;
34typedef const VectorBlock<const Derived> ConstSegmentReturnType;
35template<
int Size>
struct FixedSegmentReturnType {
typedef VectorBlock<Derived, Size> Type; };
36template<
int Size>
struct ConstFixedSegmentReturnType {
typedef const VectorBlock<const Derived, Size> Type; };
56inline Block<Derived> block(Index startRow, Index startCol, Index blockRows, Index blockCols)
58 return Block<Derived>(derived(), startRow, startCol, blockRows, blockCols);
62inline const Block<const Derived> block(Index startRow, Index startCol, Index blockRows, Index blockCols)
const
64 return Block<const Derived>(derived(), startRow, startCol, blockRows, blockCols);
80inline Block<Derived> topRightCorner(Index cRows, Index cCols)
82 return Block<Derived>(derived(), 0, cols() - cCols, cRows, cCols);
86inline const Block<const Derived> topRightCorner(Index cRows, Index cCols)
const
88 return Block<const Derived>(derived(), 0, cols() - cCols, cRows, cCols);
101template<
int CRows,
int CCols>
102inline Block<Derived, CRows, CCols> topRightCorner()
104 return Block<Derived, CRows, CCols>(derived(), 0, cols() - CCols);
108template<
int CRows,
int CCols>
109inline const Block<const Derived, CRows, CCols> topRightCorner()
const
111 return Block<const Derived, CRows, CCols>(derived(), 0, cols() - CCols);
131template<
int CRows,
int CCols>
132inline Block<Derived, CRows, CCols> topRightCorner(Index cRows, Index cCols)
134 return Block<Derived, CRows, CCols>(derived(), 0, cols() - cCols, cRows, cCols);
138template<
int CRows,
int CCols>
139inline const Block<const Derived, CRows, CCols> topRightCorner(Index cRows, Index cCols)
const
141 return Block<const Derived, CRows, CCols>(derived(), 0, cols() - cCols, cRows, cCols);
156inline Block<Derived> topLeftCorner(Index cRows, Index cCols)
158 return Block<Derived>(derived(), 0, 0, cRows, cCols);
162inline const Block<const Derived> topLeftCorner(Index cRows, Index cCols)
const
164 return Block<const Derived>(derived(), 0, 0, cRows, cCols);
176template<
int CRows,
int CCols>
177inline Block<Derived, CRows, CCols> topLeftCorner()
179 return Block<Derived, CRows, CCols>(derived(), 0, 0);
183template<
int CRows,
int CCols>
184inline const Block<const Derived, CRows, CCols> topLeftCorner()
const
186 return Block<const Derived, CRows, CCols>(derived(), 0, 0);
206template<
int CRows,
int CCols>
207inline Block<Derived, CRows, CCols> topLeftCorner(Index cRows, Index cCols)
209 return Block<Derived, CRows, CCols>(derived(), 0, 0, cRows, cCols);
213template<
int CRows,
int CCols>
214inline const Block<const Derived, CRows, CCols> topLeftCorner(Index cRows, Index cCols)
const
216 return Block<const Derived, CRows, CCols>(derived(), 0, 0, cRows, cCols);
231inline Block<Derived> bottomRightCorner(Index cRows, Index cCols)
233 return Block<Derived>(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
237inline const Block<const Derived> bottomRightCorner(Index cRows, Index cCols)
const
239 return Block<const Derived>(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
251template<
int CRows,
int CCols>
252inline Block<Derived, CRows, CCols> bottomRightCorner()
254 return Block<Derived, CRows, CCols>(derived(), rows() - CRows, cols() - CCols);
258template<
int CRows,
int CCols>
259inline const Block<const Derived, CRows, CCols> bottomRightCorner()
const
261 return Block<const Derived, CRows, CCols>(derived(), rows() - CRows, cols() - CCols);
281template<
int CRows,
int CCols>
282inline Block<Derived, CRows, CCols> bottomRightCorner(Index cRows, Index cCols)
284 return Block<Derived, CRows, CCols>(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
288template<
int CRows,
int CCols>
289inline const Block<const Derived, CRows, CCols> bottomRightCorner(Index cRows, Index cCols)
const
291 return Block<const Derived, CRows, CCols>(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
306inline Block<Derived> bottomLeftCorner(Index cRows, Index cCols)
308 return Block<Derived>(derived(), rows() - cRows, 0, cRows, cCols);
312inline const Block<const Derived> bottomLeftCorner(Index cRows, Index cCols)
const
314 return Block<const Derived>(derived(), rows() - cRows, 0, cRows, cCols);
326template<
int CRows,
int CCols>
327inline Block<Derived, CRows, CCols> bottomLeftCorner()
329 return Block<Derived, CRows, CCols>(derived(), rows() - CRows, 0);
333template<
int CRows,
int CCols>
334inline const Block<const Derived, CRows, CCols> bottomLeftCorner()
const
336 return Block<const Derived, CRows, CCols>(derived(), rows() - CRows, 0);
356template<
int CRows,
int CCols>
357inline Block<Derived, CRows, CCols> bottomLeftCorner(Index cRows, Index cCols)
359 return Block<Derived, CRows, CCols>(derived(), rows() - cRows, 0, cRows, cCols);
363template<
int CRows,
int CCols>
364inline const Block<const Derived, CRows, CCols> bottomLeftCorner(Index cRows, Index cCols)
const
366 return Block<const Derived, CRows, CCols>(derived(), rows() - cRows, 0, cRows, cCols);
380inline RowsBlockXpr topRows(Index n)
382 return RowsBlockXpr(derived(), 0, 0, n, cols());
386inline ConstRowsBlockXpr topRows(Index n)
const
388 return ConstRowsBlockXpr(derived(), 0, 0, n, cols());
405inline typename NRowsBlockXpr<N>::Type topRows(Index n = N)
407 return typename NRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
412inline typename ConstNRowsBlockXpr<N>::Type topRows(Index n = N)
const
414 return typename ConstNRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
428inline RowsBlockXpr bottomRows(Index n)
430 return RowsBlockXpr(derived(), rows() - n, 0, n, cols());
434inline ConstRowsBlockXpr bottomRows(Index n)
const
436 return ConstRowsBlockXpr(derived(), rows() - n, 0, n, cols());
453inline typename NRowsBlockXpr<N>::Type bottomRows(Index n = N)
455 return typename NRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
460inline typename ConstNRowsBlockXpr<N>::Type bottomRows(Index n = N)
const
462 return typename ConstNRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
477inline RowsBlockXpr middleRows(Index startRow, Index n)
479 return RowsBlockXpr(derived(), startRow, 0, n, cols());
483inline ConstRowsBlockXpr middleRows(Index startRow, Index n)
const
485 return ConstRowsBlockXpr(derived(), startRow, 0, n, cols());
503inline typename NRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N)
505 return typename NRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
510inline typename ConstNRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N)
const
512 return typename ConstNRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
526inline ColsBlockXpr leftCols(Index n)
528 return ColsBlockXpr(derived(), 0, 0, rows(), n);
532inline ConstColsBlockXpr leftCols(Index n)
const
534 return ConstColsBlockXpr(derived(), 0, 0, rows(), n);
551inline typename NColsBlockXpr<N>::Type leftCols(Index n = N)
553 return typename NColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
558inline typename ConstNColsBlockXpr<N>::Type leftCols(Index n = N)
const
560 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
574inline ColsBlockXpr rightCols(Index n)
576 return ColsBlockXpr(derived(), 0, cols() - n, rows(), n);
580inline ConstColsBlockXpr rightCols(Index n)
const
582 return ConstColsBlockXpr(derived(), 0, cols() - n, rows(), n);
599inline typename NColsBlockXpr<N>::Type rightCols(Index n = N)
601 return typename NColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
606inline typename ConstNColsBlockXpr<N>::Type rightCols(Index n = N)
const
608 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
623inline ColsBlockXpr middleCols(Index startCol, Index numCols)
625 return ColsBlockXpr(derived(), 0, startCol, rows(), numCols);
629inline ConstColsBlockXpr middleCols(Index startCol, Index numCols)
const
631 return ConstColsBlockXpr(derived(), 0, startCol, rows(), numCols);
649inline typename NColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N)
651 return typename NColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
656inline typename ConstNColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N)
const
658 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
679template<
int BlockRows,
int BlockCols>
680inline Block<Derived, BlockRows, BlockCols> block(Index startRow, Index startCol)
682 return Block<Derived, BlockRows, BlockCols>(derived(), startRow, startCol);
686template<
int BlockRows,
int BlockCols>
687inline const Block<const Derived, BlockRows, BlockCols> block(Index startRow, Index startCol)
const
689 return Block<const Derived, BlockRows, BlockCols>(derived(), startRow, startCol);
711template<
int BlockRows,
int BlockCols>
712inline Block<Derived, BlockRows, BlockCols> block(Index startRow, Index startCol,
713 Index blockRows, Index blockCols)
715 return Block<Derived, BlockRows, BlockCols>(derived(), startRow, startCol, blockRows, blockCols);
719template<
int BlockRows,
int BlockCols>
720inline const Block<const Derived, BlockRows, BlockCols> block(Index startRow, Index startCol,
721 Index blockRows, Index blockCols)
const
723 return Block<const Derived, BlockRows, BlockCols>(derived(), startRow, startCol, blockRows, blockCols);
732inline ColXpr col(Index i)
734 return ColXpr(derived(), i);
738inline ConstColXpr col(Index i)
const
740 return ConstColXpr(derived(), i);
749inline RowXpr row(Index i)
751 return RowXpr(derived(), i);
755inline ConstRowXpr row(Index i)
const
757 return ConstRowXpr(derived(), i);
776inline SegmentReturnType segment(Index start, Index n)
778 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
779 return SegmentReturnType(derived(), start, n);
784inline ConstSegmentReturnType segment(Index start, Index n)
const
786 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
787 return ConstSegmentReturnType(derived(), start, n);
805inline SegmentReturnType head(Index n)
807 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
808 return SegmentReturnType(derived(), 0, n);
812inline ConstSegmentReturnType head(Index n)
const
814 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
815 return ConstSegmentReturnType(derived(), 0, n);
833inline SegmentReturnType tail(Index n)
835 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
836 return SegmentReturnType(derived(), this->size() - n, n);
840inline ConstSegmentReturnType tail(Index n)
const
842 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
843 return ConstSegmentReturnType(derived(), this->size() - n, n);
863inline typename FixedSegmentReturnType<N>::Type segment(Index start, Index n = N)
865 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
866 return typename FixedSegmentReturnType<N>::Type(derived(), start, n);
871inline typename ConstFixedSegmentReturnType<N>::Type segment(Index start, Index n = N)
const
873 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
874 return typename ConstFixedSegmentReturnType<N>::Type(derived(), start, n);
893inline typename FixedSegmentReturnType<N>::Type head(Index n = N)
895 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
896 return typename FixedSegmentReturnType<N>::Type(derived(), 0, n);
901inline typename ConstFixedSegmentReturnType<N>::Type head(Index n = N)
const
903 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
904 return typename ConstFixedSegmentReturnType<N>::Type(derived(), 0, n);
923inline typename FixedSegmentReturnType<N>::Type tail(Index n = N)
925 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
926 return typename FixedSegmentReturnType<N>::Type(derived(), size() - n);
931inline typename ConstFixedSegmentReturnType<N>::Type tail(Index n = N)
const
933 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
934 return typename ConstFixedSegmentReturnType<N>::Type(derived(), size() - n);