11#ifndef EIGEN_PARSED_BY_DOXYGEN
14typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ColXpr;
15typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ConstColXpr;
17typedef Block<Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowXpr;
18typedef const Block<const Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowXpr;
20typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime,
Dynamic, !IsRowMajor> ColsBlockXpr;
21typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime,
Dynamic, !IsRowMajor>
24typedef Block<Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowsBlockXpr;
25typedef const Block<const Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowsBlockXpr;
29 typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type;
32struct ConstNColsBlockXpr {
33 typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type;
38 typedef Block<Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type;
41struct ConstNRowsBlockXpr {
42 typedef const Block<const Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type;
45typedef Block<Derived> BlockXpr;
46typedef const Block<const Derived> ConstBlockXpr;
48template <
int Rows,
int Cols>
50 typedef Block<Derived, Rows, Cols> Type;
52template <
int Rows,
int Cols>
53struct ConstFixedBlockXpr {
54 typedef Block<const Derived, Rows, Cols> Type;
57typedef VectorBlock<Derived> SegmentReturnType;
58typedef const VectorBlock<const Derived> ConstSegmentReturnType;
60struct FixedSegmentReturnType {
61 typedef VectorBlock<Derived, Size> Type;
64struct ConstFixedSegmentReturnType {
65 typedef const VectorBlock<const Derived, Size> Type;
69typedef Block<Derived, IsRowMajor ? 1 : Dynamic, IsRowMajor ? Dynamic : 1, true> InnerVectorReturnType;
70typedef Block<const Derived, IsRowMajor ? 1 : Dynamic, IsRowMajor ? Dynamic : 1, true> ConstInnerVectorReturnType;
73typedef Block<Derived, Dynamic, Dynamic, true> InnerVectorsReturnType;
74typedef Block<const Derived, Dynamic, Dynamic, true> ConstInnerVectorsReturnType;
109EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
113template <
typename NRowsType,
typename NColsType>
114EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
115#ifndef EIGEN_PARSED_BY_DOXYGEN
116 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
117 internal::get_fixed_value<NColsType>::value>::Type
119 typename FixedBlockXpr<..., ...>::Type
121 block(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols) {
123 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
124 internal::get_fixed_value<NColsType>::value>::Type(derived(), startRow, startCol,
125 internal::get_runtime_value(blockRows),
126 internal::get_runtime_value(blockCols));
130template <
typename NRowsType,
typename NColsType>
131EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
132#ifndef EIGEN_PARSED_BY_DOXYGEN
133 const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
134 internal::get_fixed_value<NColsType>::value>::Type
136 const typename ConstFixedBlockXpr<..., ...>::Type
138 block(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols)
const {
139 return typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
140 internal::get_fixed_value<NColsType>::value>::Type(derived(), startRow, startCol,
141 internal::get_runtime_value(
143 internal::get_runtime_value(
161EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
165template <
typename NRowsType,
typename NColsType>
166EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
167#ifndef EIGEN_PARSED_BY_DOXYGEN
168 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
169 internal::get_fixed_value<NColsType>::value>::Type
171 typename FixedBlockXpr<..., ...>::Type
173 topRightCorner(NRowsType cRows, NColsType cCols) {
174 return typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
175 internal::get_fixed_value<NColsType>::value>::Type(derived(), 0,
176 cols() - internal::get_runtime_value(
178 internal::get_runtime_value(cRows),
179 internal::get_runtime_value(cCols));
183template <
typename NRowsType,
typename NColsType>
184EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
185#ifndef EIGEN_PARSED_BY_DOXYGEN
186 const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
187 internal::get_fixed_value<NColsType>::value>::Type
189 const typename ConstFixedBlockXpr<..., ...>::Type
191 topRightCorner(NRowsType cRows, NColsType cCols)
const {
193 typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
194 internal::get_fixed_value<NColsType>::value>::Type(derived(), 0,
196 internal::get_runtime_value(
198 internal::get_runtime_value(cRows),
199 internal::get_runtime_value(
211EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
215template <
int CRows,
int CCols>
216EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type topRightCorner() {
217 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), 0, cols() - CCols);
221template <
int CRows,
int CCols>
222EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type topRightCorner()
const {
223 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), 0, cols() - CCols);
241EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
245template <
int CRows,
int CCols>
246EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type topRightCorner(Index cRows,
248 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
252template <
int CRows,
int CCols>
253EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type topRightCorner(
254 Index cRows, Index cCols)
const {
255 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
272EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
276template <
typename NRowsType,
typename NColsType>
277EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
278#ifndef EIGEN_PARSED_BY_DOXYGEN
279 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
280 internal::get_fixed_value<NColsType>::value>::Type
282 typename FixedBlockXpr<..., ...>::Type
284 topLeftCorner(NRowsType cRows, NColsType cCols) {
285 return typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
286 internal::get_fixed_value<NColsType>::value>::Type(derived(), 0, 0,
287 internal::get_runtime_value(cRows),
288 internal::get_runtime_value(cCols));
292template <
typename NRowsType,
typename NColsType>
293EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
294#ifndef EIGEN_PARSED_BY_DOXYGEN
295 const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
296 internal::get_fixed_value<NColsType>::value>::Type
298 const typename ConstFixedBlockXpr<..., ...>::Type
300 topLeftCorner(NRowsType cRows, NColsType cCols)
const {
302 typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
303 internal::get_fixed_value<NColsType>::value>::Type(derived(), 0, 0,
304 internal::get_runtime_value(cRows),
305 internal::get_runtime_value(
316EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
320template <
int CRows,
int CCols>
321EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type topLeftCorner() {
322 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), 0, 0);
326template <
int CRows,
int CCols>
327EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type topLeftCorner()
const {
328 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), 0, 0);
346EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
350template <
int CRows,
int CCols>
351EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type topLeftCorner(Index cRows,
353 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), 0, 0, cRows, cCols);
357template <
int CRows,
int CCols>
358EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type topLeftCorner(
359 Index cRows, Index cCols)
const {
360 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), 0, 0, cRows, cCols);
377EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
381template <
typename NRowsType,
typename NColsType>
382EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
383#ifndef EIGEN_PARSED_BY_DOXYGEN
384 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
385 internal::get_fixed_value<NColsType>::value>::Type
387 typename FixedBlockXpr<..., ...>::Type
389 bottomRightCorner(NRowsType cRows, NColsType cCols) {
391 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value, internal::get_fixed_value<NColsType>::value>::
392 Type(derived(), rows() - internal::get_runtime_value(cRows), cols() - internal::get_runtime_value(cCols),
393 internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
397template <
typename NRowsType,
typename NColsType>
398EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
399#ifndef EIGEN_PARSED_BY_DOXYGEN
400 const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
401 internal::get_fixed_value<NColsType>::value>::Type
403 const typename ConstFixedBlockXpr<..., ...>::Type
405 bottomRightCorner(NRowsType cRows, NColsType cCols)
const {
406 return typename ConstFixedBlockXpr<
407 internal::get_fixed_value<NRowsType>::value,
408 internal::get_fixed_value<NColsType>::value>::Type(derived(), rows() - internal::get_runtime_value(cRows),
409 cols() - internal::get_runtime_value(cCols),
410 internal::get_runtime_value(cRows),
411 internal::get_runtime_value(cCols));
421EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
425template <
int CRows,
int CCols>
426EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type bottomRightCorner() {
427 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), rows() - CRows, cols() - CCols);
431template <
int CRows,
int CCols>
432EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type bottomRightCorner()
const {
433 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), rows() - CRows, cols() - CCols);
451EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
455template <
int CRows,
int CCols>
456EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type bottomRightCorner(Index cRows,
458 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
462template <
int CRows,
int CCols>
463EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type bottomRightCorner(
464 Index cRows, Index cCols)
const {
465 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
482EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
486template <
typename NRowsType,
typename NColsType>
487EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
488#ifndef EIGEN_PARSED_BY_DOXYGEN
489 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
490 internal::get_fixed_value<NColsType>::value>::Type
492 typename FixedBlockXpr<..., ...>::Type
494 bottomLeftCorner(NRowsType cRows, NColsType cCols) {
496 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
497 internal::get_fixed_value<NColsType>::value>::Type(derived(),
499 internal::get_runtime_value(cRows),
500 0, internal::get_runtime_value(cRows),
501 internal::get_runtime_value(cCols));
505template <
typename NRowsType,
typename NColsType>
506EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
507#ifndef EIGEN_PARSED_BY_DOXYGEN
508 typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
509 internal::get_fixed_value<NColsType>::value>::Type
511 typename ConstFixedBlockXpr<..., ...>::Type
513 bottomLeftCorner(NRowsType cRows, NColsType cCols)
const {
514 return typename ConstFixedBlockXpr<
515 internal::get_fixed_value<NRowsType>::value,
516 internal::get_fixed_value<NColsType>::value>::Type(derived(), rows() - internal::get_runtime_value(cRows), 0,
517 internal::get_runtime_value(cRows),
518 internal::get_runtime_value(cCols));
528EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
532template <
int CRows,
int CCols>
533EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type bottomLeftCorner() {
534 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), rows() - CRows, 0);
538template <
int CRows,
int CCols>
539EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type bottomLeftCorner()
const {
540 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), rows() - CRows, 0);
558EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
562template <
int CRows,
int CCols>
563EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type bottomLeftCorner(Index cRows, Index cCols) {
564 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
568template <
int CRows,
int CCols>
569EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type bottomLeftCorner(Index cRows,
571 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
586EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row - major)
590template <
typename NRowsType>
591EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
592#ifndef EIGEN_PARSED_BY_DOXYGEN
593 typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
595 typename NRowsBlockXpr<...>::Type
597 topRows(NRowsType n) {
598 return typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type(
599 derived(), 0, 0, internal::get_runtime_value(n), cols());
603template <
typename NRowsType>
604EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
605#ifndef EIGEN_PARSED_BY_DOXYGEN
606 const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
608 const typename ConstNRowsBlockXpr<...>::Type
610 topRows(NRowsType n)
const {
611 return typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type(
612 derived(), 0, 0, internal::get_runtime_value(n), cols());
626EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row - major)
631EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename NRowsBlockXpr<N>::Type topRows(Index n = N) {
632 return typename NRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
637EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename ConstNRowsBlockXpr<N>::Type topRows(Index n = N)
const {
638 return typename ConstNRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
653EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row - major)
657template <
typename NRowsType>
658EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
659#ifndef EIGEN_PARSED_BY_DOXYGEN
660 typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
662 typename NRowsBlockXpr<...>::Type
664 bottomRows(NRowsType n) {
665 return typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type(
666 derived(), rows() - internal::get_runtime_value(n), 0, internal::get_runtime_value(n), cols());
670template <
typename NRowsType>
671EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
672#ifndef EIGEN_PARSED_BY_DOXYGEN
673 const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
675 const typename ConstNRowsBlockXpr<...>::Type
677 bottomRows(NRowsType n)
const {
678 return typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type(
679 derived(), rows() - internal::get_runtime_value(n), 0, internal::get_runtime_value(n), cols());
693EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row - major)
698EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename NRowsBlockXpr<N>::Type bottomRows(Index n = N) {
699 return typename NRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
704EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename ConstNRowsBlockXpr<N>::Type bottomRows(Index n = N)
const {
705 return typename ConstNRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
721EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row - major)
725template <
typename NRowsType>
726EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
727#ifndef EIGEN_PARSED_BY_DOXYGEN
728 typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
730 typename NRowsBlockXpr<...>::Type
732 middleRows(Index startRow, NRowsType n) {
733 return typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type(
734 derived(), startRow, 0, internal::get_runtime_value(n), cols());
738template <
typename NRowsType>
739EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
740#ifndef EIGEN_PARSED_BY_DOXYGEN
741 const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
743 const typename ConstNRowsBlockXpr<...>::Type
745 middleRows(Index startRow, NRowsType n)
const {
746 return typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type(
747 derived(), startRow, 0, internal::get_runtime_value(n), cols());
762EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row - major)
767EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename NRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N) {
768 return typename NRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
773EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename ConstNRowsBlockXpr<N>::Type middleRows(Index startRow,
775 return typename ConstNRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
790EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column - major)
794template <
typename NColsType>
795EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
796#ifndef EIGEN_PARSED_BY_DOXYGEN
797 typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
799 typename NColsBlockXpr<...>::Type
801 leftCols(NColsType n) {
802 return typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type(derived(), 0, 0, rows(),
803 internal::get_runtime_value(n));
807template <
typename NColsType>
808EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
809#ifndef EIGEN_PARSED_BY_DOXYGEN
810 const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
812 const typename ConstNColsBlockXpr<...>::Type
814 leftCols(NColsType n)
const {
815 return typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type(derived(), 0, 0, rows(),
816 internal::get_runtime_value(n));
830EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column - major)
835EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename NColsBlockXpr<N>::Type leftCols(Index n = N) {
836 return typename NColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
841EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename ConstNColsBlockXpr<N>::Type leftCols(Index n = N)
const {
842 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
857EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column - major)
861template <
typename NColsType>
862EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
863#ifndef EIGEN_PARSED_BY_DOXYGEN
864 typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
866 typename NColsBlockXpr<...>::Type
868 rightCols(NColsType n) {
869 return typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type(
870 derived(), 0, cols() - internal::get_runtime_value(n), rows(), internal::get_runtime_value(n));
874template <
typename NColsType>
875EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
876#ifndef EIGEN_PARSED_BY_DOXYGEN
877 const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
879 const typename ConstNColsBlockXpr<...>::Type
881 rightCols(NColsType n)
const {
882 return typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type(
883 derived(), 0, cols() - internal::get_runtime_value(n), rows(), internal::get_runtime_value(n));
897EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column - major)
902EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename NColsBlockXpr<N>::Type rightCols(Index n = N) {
903 return typename NColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
908EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename ConstNColsBlockXpr<N>::Type rightCols(Index n = N)
const {
909 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
925EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column - major)
929template <
typename NColsType>
930EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
931#ifndef EIGEN_PARSED_BY_DOXYGEN
932 typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
934 typename NColsBlockXpr<...>::Type
936 middleCols(Index startCol, NColsType numCols) {
937 return typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type(
938 derived(), 0, startCol, rows(), internal::get_runtime_value(numCols));
942template <
typename NColsType>
943EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
944#ifndef EIGEN_PARSED_BY_DOXYGEN
945 const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
947 const typename ConstNColsBlockXpr<...>::Type
949 middleCols(Index startCol, NColsType numCols)
const {
950 return typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type(
951 derived(), 0, startCol, rows(), internal::get_runtime_value(numCols));
966EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column - major)
971EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename NColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N) {
972 return typename NColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
977EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename ConstNColsBlockXpr<N>::Type middleCols(Index startCol,
979 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
1002EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
1006template <
int NRows,
int NCols>
1007EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename FixedBlockXpr<NRows, NCols>::Type block(Index startRow, Index startCol) {
1008 return typename FixedBlockXpr<NRows, NCols>::Type(derived(), startRow, startCol);
1012template <
int NRows,
int NCols>
1013EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<NRows, NCols>::Type block(
1014 Index startRow, Index startCol)
const {
1015 return typename ConstFixedBlockXpr<NRows, NCols>::Type(derived(), startRow, startCol);
1045EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
1049template <
int NRows,
int NCols>
1050EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename FixedBlockXpr<NRows, NCols>::Type block(Index startRow, Index startCol,
1053 return typename FixedBlockXpr<NRows, NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
1057template <
int NRows,
int NCols>
1058EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<NRows, NCols>::Type block(
1059 Index startRow, Index startCol, Index blockRows, Index blockCols)
const {
1060 return typename ConstFixedBlockXpr<NRows, NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
1068EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column - major)
1071EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ColXpr col(Index i) {
return ColXpr(derived(), i); }
1074EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstColXpr col(Index i)
const {
return ConstColXpr(derived(), i); }
1081EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row - major)
1084EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE RowXpr row(Index i) {
return RowXpr(derived(), i); }
1087EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ConstRowXpr row(Index i)
const {
return ConstRowXpr(derived(), i); }
1110template <
typename NType>
1111EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1112#ifndef EIGEN_PARSED_BY_DOXYGEN
1113 typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1115 typename FixedSegmentReturnType<...>::Type
1117 segment(Index start, NType n) {
1118 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1119 return typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type(derived(), start,
1120 internal::get_runtime_value(n));
1124template <
typename NType>
1125EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1126#ifndef EIGEN_PARSED_BY_DOXYGEN
1127 const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1129 const typename ConstFixedSegmentReturnType<...>::Type
1131 segment(Index start, NType n)
const {
1132 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1133 return typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type(
1134 derived(), start, internal::get_runtime_value(n));
1157template <
typename NType>
1158EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1159#ifndef EIGEN_PARSED_BY_DOXYGEN
1160 typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1162 typename FixedSegmentReturnType<...>::Type
1165 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1166 return typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type(derived(), 0,
1167 internal::get_runtime_value(n));
1171template <
typename NType>
1172EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1173#ifndef EIGEN_PARSED_BY_DOXYGEN
1174 const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1176 const typename ConstFixedSegmentReturnType<...>::Type
1178 head(NType n)
const {
1179 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1180 return typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type(
1181 derived(), 0, internal::get_runtime_value(n));
1204template <
typename NType>
1205EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1206#ifndef EIGEN_PARSED_BY_DOXYGEN
1207 typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1209 typename FixedSegmentReturnType<...>::Type
1212 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1213 return typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type(
1214 derived(), this->size() - internal::get_runtime_value(n), internal::get_runtime_value(n));
1218template <
typename NType>
1219EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1220#ifndef EIGEN_PARSED_BY_DOXYGEN
1221 const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1223 const typename ConstFixedSegmentReturnType<...>::Type
1225 tail(NType n)
const {
1226 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1227 return typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type(
1228 derived(), this->size() - internal::get_runtime_value(n), internal::get_runtime_value(n));
1248EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename FixedSegmentReturnType<N>::Type segment(Index start, Index n = N) {
1249 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1250 return typename FixedSegmentReturnType<N>::Type(derived(), start, n);
1255EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename ConstFixedSegmentReturnType<N>::Type segment(Index start,
1256 Index n = N)
const {
1257 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1258 return typename ConstFixedSegmentReturnType<N>::Type(derived(), start, n);
1277EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename FixedSegmentReturnType<N>::Type head(Index n = N) {
1278 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1279 return typename FixedSegmentReturnType<N>::Type(derived(), 0, n);
1284EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename ConstFixedSegmentReturnType<N>::Type head(Index n = N)
const {
1285 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1286 return typename ConstFixedSegmentReturnType<N>::Type(derived(), 0, n);
1305EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename FixedSegmentReturnType<N>::Type tail(Index n = N) {
1306 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1307 return typename FixedSegmentReturnType<N>::Type(derived(), size() - n);
1312EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename ConstFixedSegmentReturnType<N>::Type tail(Index n = N)
const {
1313 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1314 return typename ConstFixedSegmentReturnType<N>::Type(derived(), size() - n);
1320EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE InnerVectorReturnType innerVector(Index outer) {
1321 return InnerVectorReturnType(derived(), outer);
1327EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const ConstInnerVectorReturnType innerVector(Index outer)
const {
1328 return ConstInnerVectorReturnType(derived(), outer);
1334EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE InnerVectorsReturnType innerVectors(Index outerStart, Index outerSize) {
1335 return Block<Derived, Dynamic, Dynamic, true>(derived(), IsRowMajor ? outerStart : 0, IsRowMajor ? 0 : outerStart,
1336 IsRowMajor ? outerSize : rows(), IsRowMajor ? cols() : outerSize);
1342EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const ConstInnerVectorsReturnType innerVectors(Index outerStart,
1343 Index outerSize)
const {
1344 return Block<const Derived, Dynamic, Dynamic, true>(derived(), IsRowMajor ? outerStart : 0,
1345 IsRowMajor ? 0 : outerStart, IsRowMajor ? outerSize : rows(),
1346 IsRowMajor ? cols() : outerSize);
1352template <DirectionType Direction>
1353EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::conditional_t<Direction == Vertical, ColXpr, RowXpr> subVector(Index i) {
1354 return std::conditional_t<Direction == Vertical, ColXpr, RowXpr>(derived(), i);
1358template <DirectionType Direction>
1359EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::conditional_t<Direction == Vertical, ConstColXpr, ConstRowXpr> subVector(
1361 return std::conditional_t<Direction == Vertical, ConstColXpr, ConstRowXpr>(derived(), i);
1367template <DirectionType Direction>
1368EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index subVectors()
const {
1369 return (Direction == Vertical) ? cols() : rows();
const int Dynamic
Definition Constants.h:25