12#ifndef EIGEN_PARSED_BY_DOXYGEN
15using ColXpr = Block<Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor>;
16using ConstColXpr =
const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor>;
18using RowXpr = Block<Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor>;
19using ConstRowXpr =
const Block<const Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor>;
21using ColsBlockXpr = Block<Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor>;
22using ConstColsBlockXpr =
23 const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor>;
25using RowsBlockXpr = Block<Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor>;
26using ConstRowsBlockXpr =
const Block<const Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor>;
30 using Type = Block<Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor>;
33struct ConstNColsBlockXpr {
34 using Type =
const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor>;
39 using Type = Block<Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor>;
42struct ConstNRowsBlockXpr {
43 using Type =
const Block<const Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor>;
46using BlockXpr = Block<Derived>;
47using ConstBlockXpr =
const Block<const Derived>;
49template <
int Rows,
int Cols>
51 using Type = Block<Derived, Rows, Cols>;
53template <
int Rows,
int Cols>
54struct ConstFixedBlockXpr {
55 using Type = Block<const Derived, Rows, Cols>;
58using SegmentReturnType = VectorBlock<Derived>;
59using ConstSegmentReturnType =
const VectorBlock<const Derived>;
61struct FixedSegmentReturnType {
62 using Type = VectorBlock<Derived, Size>;
65struct ConstFixedSegmentReturnType {
66 using Type =
const VectorBlock<const Derived, Size>;
70using InnerVectorReturnType = std::conditional_t<IsRowMajor, RowXpr, ColXpr>;
71using ConstInnerVectorReturnType = std::conditional_t<IsRowMajor, ConstRowXpr, ConstColXpr>;
74using InnerVectorsReturnType = std::conditional_t<IsRowMajor, RowsBlockXpr, ColsBlockXpr>;
75using ConstInnerVectorsReturnType = std::conditional_t<IsRowMajor, ConstRowsBlockXpr, ConstColsBlockXpr>;
110EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
114template <
typename NRowsType,
typename NColsType>
115EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
116#ifndef EIGEN_PARSED_BY_DOXYGEN
117 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
118 internal::get_fixed_value<NColsType>::value>::Type
120 typename FixedBlockXpr<..., ...>::Type
122 block(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols) {
124 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
125 internal::get_fixed_value<NColsType>::value>::Type(derived(), startRow, startCol,
126 internal::get_runtime_value(blockRows),
127 internal::get_runtime_value(blockCols));
131template <
typename NRowsType,
typename NColsType>
132EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
133#ifndef EIGEN_PARSED_BY_DOXYGEN
134 const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
135 internal::get_fixed_value<NColsType>::value>::Type
137 const typename ConstFixedBlockXpr<..., ...>::Type
139 block(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols)
const {
140 return typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
141 internal::get_fixed_value<NColsType>::value>::Type(derived(), startRow, startCol,
142 internal::get_runtime_value(
144 internal::get_runtime_value(
162EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
166template <
typename NRowsType,
typename NColsType>
167EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
168#ifndef EIGEN_PARSED_BY_DOXYGEN
169 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
170 internal::get_fixed_value<NColsType>::value>::Type
172 typename FixedBlockXpr<..., ...>::Type
174 topRightCorner(NRowsType cRows, NColsType cCols) {
175 return typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
176 internal::get_fixed_value<NColsType>::value>::Type(derived(), 0,
177 cols() - internal::get_runtime_value(
179 internal::get_runtime_value(cRows),
180 internal::get_runtime_value(cCols));
184template <
typename NRowsType,
typename NColsType>
185EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
186#ifndef EIGEN_PARSED_BY_DOXYGEN
187 const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
188 internal::get_fixed_value<NColsType>::value>::Type
190 const typename ConstFixedBlockXpr<..., ...>::Type
192 topRightCorner(NRowsType cRows, NColsType cCols)
const {
194 typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
195 internal::get_fixed_value<NColsType>::value>::Type(derived(), 0,
197 internal::get_runtime_value(
199 internal::get_runtime_value(cRows),
200 internal::get_runtime_value(
212EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
216template <
int CRows,
int CCols>
217EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type topRightCorner() {
218 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), 0, cols() - CCols);
222template <
int CRows,
int CCols>
223EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type topRightCorner()
225 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), 0, cols() - CCols);
243EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
247template <
int CRows,
int CCols>
248EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type topRightCorner(Index cRows,
250 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
254template <
int CRows,
int CCols>
255EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type topRightCorner(
256 Index cRows, Index cCols)
const {
257 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
274EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
278template <
typename NRowsType,
typename NColsType>
279EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
280#ifndef EIGEN_PARSED_BY_DOXYGEN
281 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
282 internal::get_fixed_value<NColsType>::value>::Type
284 typename FixedBlockXpr<..., ...>::Type
286 topLeftCorner(NRowsType cRows, NColsType cCols) {
287 return typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
288 internal::get_fixed_value<NColsType>::value>::Type(derived(), 0, 0,
289 internal::get_runtime_value(cRows),
290 internal::get_runtime_value(cCols));
294template <
typename NRowsType,
typename NColsType>
295EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
296#ifndef EIGEN_PARSED_BY_DOXYGEN
297 const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
298 internal::get_fixed_value<NColsType>::value>::Type
300 const typename ConstFixedBlockXpr<..., ...>::Type
302 topLeftCorner(NRowsType cRows, NColsType cCols)
const {
304 typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
305 internal::get_fixed_value<NColsType>::value>::Type(derived(), 0, 0,
306 internal::get_runtime_value(cRows),
307 internal::get_runtime_value(
318EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
322template <
int CRows,
int CCols>
323EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type topLeftCorner() {
324 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), 0, 0);
328template <
int CRows,
int CCols>
329EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type topLeftCorner()
331 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), 0, 0);
349EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
353template <
int CRows,
int CCols>
354EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type topLeftCorner(Index cRows,
356 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), 0, 0, cRows, cCols);
360template <
int CRows,
int CCols>
361EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type topLeftCorner(
362 Index cRows, Index cCols)
const {
363 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), 0, 0, cRows, cCols);
380EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
384template <
typename NRowsType,
typename NColsType>
385EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
386#ifndef EIGEN_PARSED_BY_DOXYGEN
387 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
388 internal::get_fixed_value<NColsType>::value>::Type
390 typename FixedBlockXpr<..., ...>::Type
392 bottomRightCorner(NRowsType cRows, NColsType cCols) {
394 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value, internal::get_fixed_value<NColsType>::value>::
395 Type(derived(), rows() - internal::get_runtime_value(cRows), cols() - internal::get_runtime_value(cCols),
396 internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
400template <
typename NRowsType,
typename NColsType>
401EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
402#ifndef EIGEN_PARSED_BY_DOXYGEN
403 const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
404 internal::get_fixed_value<NColsType>::value>::Type
406 const typename ConstFixedBlockXpr<..., ...>::Type
408 bottomRightCorner(NRowsType cRows, NColsType cCols)
const {
409 return typename ConstFixedBlockXpr<
410 internal::get_fixed_value<NRowsType>::value,
411 internal::get_fixed_value<NColsType>::value>::Type(derived(), rows() - internal::get_runtime_value(cRows),
412 cols() - internal::get_runtime_value(cCols),
413 internal::get_runtime_value(cRows),
414 internal::get_runtime_value(cCols));
424EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
428template <
int CRows,
int CCols>
429EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type bottomRightCorner() {
430 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), rows() - CRows, cols() - CCols);
434template <
int CRows,
int CCols>
435EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type
436bottomRightCorner()
const {
437 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), rows() - CRows, cols() - CCols);
455EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
459template <
int CRows,
int CCols>
460EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type bottomRightCorner(
461 Index cRows, Index cCols) {
462 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
466template <
int CRows,
int CCols>
467EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type bottomRightCorner(
468 Index cRows, Index cCols)
const {
469 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
486EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
490template <
typename NRowsType,
typename NColsType>
491EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
492#ifndef EIGEN_PARSED_BY_DOXYGEN
493 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
494 internal::get_fixed_value<NColsType>::value>::Type
496 typename FixedBlockXpr<..., ...>::Type
498 bottomLeftCorner(NRowsType cRows, NColsType cCols) {
500 typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
501 internal::get_fixed_value<NColsType>::value>::Type(derived(),
503 internal::get_runtime_value(cRows),
504 0, internal::get_runtime_value(cRows),
505 internal::get_runtime_value(cCols));
509template <
typename NRowsType,
typename NColsType>
510EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
511#ifndef EIGEN_PARSED_BY_DOXYGEN
512 typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,
513 internal::get_fixed_value<NColsType>::value>::Type
515 typename ConstFixedBlockXpr<..., ...>::Type
517 bottomLeftCorner(NRowsType cRows, NColsType cCols)
const {
518 return typename ConstFixedBlockXpr<
519 internal::get_fixed_value<NRowsType>::value,
520 internal::get_fixed_value<NColsType>::value>::Type(derived(), rows() - internal::get_runtime_value(cRows), 0,
521 internal::get_runtime_value(cRows),
522 internal::get_runtime_value(cCols));
532EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
536template <
int CRows,
int CCols>
537EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type bottomLeftCorner() {
538 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), rows() - CRows, 0);
542template <
int CRows,
int CCols>
543EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type bottomLeftCorner()
545 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), rows() - CRows, 0);
563EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
567template <
int CRows,
int CCols>
568EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows, CCols>::Type bottomLeftCorner(
569 Index cRows, Index cCols) {
570 return typename FixedBlockXpr<CRows, CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
574template <
int CRows,
int CCols>
575EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows, CCols>::Type bottomLeftCorner(
576 Index cRows, Index cCols)
const {
577 return typename ConstFixedBlockXpr<CRows, CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
592EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row - major)
596template <
typename NRowsType>
597EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
598#ifndef EIGEN_PARSED_BY_DOXYGEN
599 typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
601 typename NRowsBlockXpr<...>::Type
603 topRows(NRowsType n) {
604 return typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type(
605 derived(), 0, 0, internal::get_runtime_value(n), cols());
609template <
typename NRowsType>
610EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
611#ifndef EIGEN_PARSED_BY_DOXYGEN
612 const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
614 const typename ConstNRowsBlockXpr<...>::Type
616 topRows(NRowsType n)
const {
617 return typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type(
618 derived(), 0, 0, internal::get_runtime_value(n), cols());
632EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row - major)
637EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename NRowsBlockXpr<N>::Type topRows(Index n = N) {
638 return typename NRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
643EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename ConstNRowsBlockXpr<N>::Type topRows(Index n = N)
const {
644 return typename ConstNRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
659EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row - major)
663template <
typename NRowsType>
664EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
665#ifndef EIGEN_PARSED_BY_DOXYGEN
666 typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
668 typename NRowsBlockXpr<...>::Type
670 bottomRows(NRowsType n) {
671 return typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type(
672 derived(), rows() - internal::get_runtime_value(n), 0, internal::get_runtime_value(n), cols());
676template <
typename NRowsType>
677EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
678#ifndef EIGEN_PARSED_BY_DOXYGEN
679 const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
681 const typename ConstNRowsBlockXpr<...>::Type
683 bottomRows(NRowsType n)
const {
684 return typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type(
685 derived(), rows() - internal::get_runtime_value(n), 0, internal::get_runtime_value(n), cols());
699EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row - major)
704EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename NRowsBlockXpr<N>::Type bottomRows(Index n = N) {
705 return typename NRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
710EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename ConstNRowsBlockXpr<N>::Type bottomRows(Index n = N)
const {
711 return typename ConstNRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
727EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row - major)
731template <
typename NRowsType>
732EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
733#ifndef EIGEN_PARSED_BY_DOXYGEN
734 typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
736 typename NRowsBlockXpr<...>::Type
738 middleRows(Index startRow, NRowsType n) {
739 return typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type(
740 derived(), startRow, 0, internal::get_runtime_value(n), cols());
744template <
typename NRowsType>
745EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
746#ifndef EIGEN_PARSED_BY_DOXYGEN
747 const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
749 const typename ConstNRowsBlockXpr<...>::Type
751 middleRows(Index startRow, NRowsType n)
const {
752 return typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type(
753 derived(), startRow, 0, internal::get_runtime_value(n), cols());
768EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row - major)
773EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename NRowsBlockXpr<N>::Type middleRows(Index startRow,
775 return typename NRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
780EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename ConstNRowsBlockXpr<N>::Type middleRows(Index startRow,
782 return typename ConstNRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
797EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column - major)
801template <
typename NColsType>
802EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
803#ifndef EIGEN_PARSED_BY_DOXYGEN
804 typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
806 typename NColsBlockXpr<...>::Type
808 leftCols(NColsType n) {
809 return typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type(derived(), 0, 0, rows(),
810 internal::get_runtime_value(n));
814template <
typename NColsType>
815EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
816#ifndef EIGEN_PARSED_BY_DOXYGEN
817 const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
819 const typename ConstNColsBlockXpr<...>::Type
821 leftCols(NColsType n)
const {
822 return typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type(derived(), 0, 0, rows(),
823 internal::get_runtime_value(n));
837EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column - major)
842EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename NColsBlockXpr<N>::Type leftCols(Index n = N) {
843 return typename NColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
848EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename ConstNColsBlockXpr<N>::Type leftCols(Index n = N)
const {
849 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
864EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column - major)
868template <
typename NColsType>
869EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
870#ifndef EIGEN_PARSED_BY_DOXYGEN
871 typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
873 typename NColsBlockXpr<...>::Type
875 rightCols(NColsType n) {
876 return typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type(
877 derived(), 0, cols() - internal::get_runtime_value(n), rows(), internal::get_runtime_value(n));
881template <
typename NColsType>
882EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
883#ifndef EIGEN_PARSED_BY_DOXYGEN
884 const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
886 const typename ConstNColsBlockXpr<...>::Type
888 rightCols(NColsType n)
const {
889 return typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type(
890 derived(), 0, cols() - internal::get_runtime_value(n), rows(), internal::get_runtime_value(n));
904EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column - major)
909EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename NColsBlockXpr<N>::Type rightCols(Index n = N) {
910 return typename NColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
915EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename ConstNColsBlockXpr<N>::Type rightCols(Index n = N)
const {
916 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
932EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column - major)
936template <
typename NColsType>
937EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
938#ifndef EIGEN_PARSED_BY_DOXYGEN
939 typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
941 typename NColsBlockXpr<...>::Type
943 middleCols(Index startCol, NColsType numCols) {
944 return typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type(
945 derived(), 0, startCol, rows(), internal::get_runtime_value(numCols));
949template <
typename NColsType>
950EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
951#ifndef EIGEN_PARSED_BY_DOXYGEN
952 const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
954 const typename ConstNColsBlockXpr<...>::Type
956 middleCols(Index startCol, NColsType numCols)
const {
957 return typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type(
958 derived(), 0, startCol, rows(), internal::get_runtime_value(numCols));
973EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column - major)
978EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename NColsBlockXpr<N>::Type middleCols(Index startCol,
980 return typename NColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
985EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename ConstNColsBlockXpr<N>::Type middleCols(Index startCol,
987 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
1010EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
1014template <
int NRows,
int NCols>
1015EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename FixedBlockXpr<NRows, NCols>::Type block(Index startRow,
1017 return typename FixedBlockXpr<NRows, NCols>::Type(derived(), startRow, startCol);
1021template <
int NRows,
int NCols>
1022EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<NRows, NCols>::Type block(
1023 Index startRow, Index startCol)
const {
1024 return typename ConstFixedBlockXpr<NRows, NCols>::Type(derived(), startRow, startCol);
1054EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
1058template <
int NRows,
int NCols>
1059EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename FixedBlockXpr<NRows, NCols>::Type block(Index startRow,
1063 return typename FixedBlockXpr<NRows, NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
1067template <
int NRows,
int NCols>
1068EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<NRows, NCols>::Type block(
1069 Index startRow, Index startCol, Index blockRows, Index blockCols)
const {
1070 return typename ConstFixedBlockXpr<NRows, NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
1078EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column - major)
1081EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE ColXpr col(Index i) {
return ColXpr(derived(), i); }
1084EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE ConstColXpr col(Index i)
const {
return ConstColXpr(derived(), i); }
1091EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row - major)
1094EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE RowXpr row(Index i) {
return RowXpr(derived(), i); }
1097EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE ConstRowXpr row(Index i)
const {
return ConstRowXpr(derived(), i); }
1120template <
typename NType>
1121EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
1122#ifndef EIGEN_PARSED_BY_DOXYGEN
1123 typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1125 typename FixedSegmentReturnType<...>::Type
1127 segment(Index start, NType n) {
1128 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1129 return typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type(derived(), start,
1130 internal::get_runtime_value(n));
1134template <
typename NType>
1135EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
1136#ifndef EIGEN_PARSED_BY_DOXYGEN
1137 const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1139 const typename ConstFixedSegmentReturnType<...>::Type
1141 segment(Index start, NType n)
const {
1142 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1143 return typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type(
1144 derived(), start, internal::get_runtime_value(n));
1167template <
typename NType>
1168EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
1169#ifndef EIGEN_PARSED_BY_DOXYGEN
1170 typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1172 typename FixedSegmentReturnType<...>::Type
1175 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1176 return typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type(derived(), 0,
1177 internal::get_runtime_value(n));
1181template <
typename NType>
1182EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
1183#ifndef EIGEN_PARSED_BY_DOXYGEN
1184 const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1186 const typename ConstFixedSegmentReturnType<...>::Type
1188 head(NType n)
const {
1189 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1190 return typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type(
1191 derived(), 0, internal::get_runtime_value(n));
1214template <
typename NType>
1215EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
1216#ifndef EIGEN_PARSED_BY_DOXYGEN
1217 typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1219 typename FixedSegmentReturnType<...>::Type
1222 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1223 return typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type(
1224 derived(), this->size() - internal::get_runtime_value(n), internal::get_runtime_value(n));
1228template <
typename NType>
1229EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
1230#ifndef EIGEN_PARSED_BY_DOXYGEN
1231 const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1233 const typename ConstFixedSegmentReturnType<...>::Type
1235 tail(NType n)
const {
1236 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1237 return typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type(
1238 derived(), this->size() - internal::get_runtime_value(n), internal::get_runtime_value(n));
1258EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename FixedSegmentReturnType<N>::Type segment(Index start,
1260 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1261 return typename FixedSegmentReturnType<N>::Type(derived(), start, n);
1266EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename ConstFixedSegmentReturnType<N>::Type segment(
1267 Index start, Index n = N)
const {
1268 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1269 return typename ConstFixedSegmentReturnType<N>::Type(derived(), start, n);
1288EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename FixedSegmentReturnType<N>::Type head(Index n = N) {
1289 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1290 return typename FixedSegmentReturnType<N>::Type(derived(), 0, n);
1295EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename ConstFixedSegmentReturnType<N>::Type head(Index n = N)
const {
1296 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1297 return typename ConstFixedSegmentReturnType<N>::Type(derived(), 0, n);
1316EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename FixedSegmentReturnType<N>::Type tail(Index n = N) {
1317 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1318 return typename FixedSegmentReturnType<N>::Type(derived(), size() - n, n);
1323EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
typename ConstFixedSegmentReturnType<N>::Type tail(Index n = N)
const {
1324 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1325 return typename ConstFixedSegmentReturnType<N>::Type(derived(), size() - n, n);
1331EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE InnerVectorReturnType innerVector(Index outer) {
1332 return InnerVectorReturnType(derived(), outer);
1338EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const ConstInnerVectorReturnType innerVector(Index outer)
const {
1339 return ConstInnerVectorReturnType(derived(), outer);
1345EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE InnerVectorsReturnType innerVectors(Index outerStart, Index outerSize) {
1346 return InnerVectorsReturnType(derived(), IsRowMajor ? outerStart : 0, IsRowMajor ? 0 : outerStart,
1347 IsRowMajor ? outerSize : rows(), IsRowMajor ? cols() : outerSize);
1353EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const ConstInnerVectorsReturnType innerVectors(Index outerStart,
1354 Index outerSize)
const {
1355 return ConstInnerVectorsReturnType(derived(), IsRowMajor ? outerStart : 0, IsRowMajor ? 0 : outerStart,
1356 IsRowMajor ? outerSize : rows(), IsRowMajor ? cols() : outerSize);
1362template <DirectionType Direction>
1363EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE std::conditional_t<Direction == Vertical, ColXpr, RowXpr> subVector(
1365 return std::conditional_t<Direction == Vertical, ColXpr, RowXpr>(derived(), i);
1369template <DirectionType Direction>
1370EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE std::conditional_t<Direction == Vertical, ConstColXpr, ConstRowXpr>
1371subVector(Index i)
const {
1372 return std::conditional_t<Direction == Vertical, ConstColXpr, ConstRowXpr>(derived(), i);
1378template <DirectionType Direction>
1379EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
constexpr Index subVectors()
const {
1380 return (Direction == Vertical) ? cols() : rows();