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;
44 typedef Block<Derived,IsRowMajor?1:Dynamic,IsRowMajor?Dynamic:1,true> InnerVectorReturnType;
45 typedef Block<const Derived,IsRowMajor?1:Dynamic,IsRowMajor?Dynamic:1,true> ConstInnerVectorReturnType;
48 typedef Block<Derived,Dynamic,Dynamic,true> InnerVectorsReturnType;
49 typedef Block<const Derived,Dynamic,Dynamic,true> ConstInnerVectorsReturnType;
51 #endif // not EIGEN_PARSED_BY_DOXYGEN
85 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
89 template<
typename NRowsType,
typename NColsType>
90 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
91 #ifndef EIGEN_PARSED_BY_DOXYGEN
96 block(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols)
99 derived(), startRow, startCol, internal::get_runtime_value(blockRows), internal::get_runtime_value(blockCols));
103 template<
typename NRowsType,
typename NColsType>
104 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
105 #ifndef EIGEN_PARSED_BY_DOXYGEN
110 block(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols)
const
113 derived(), startRow, startCol, internal::get_runtime_value(blockRows), internal::get_runtime_value(blockCols));
131 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
135 template<
typename NRowsType,
typename NColsType>
136 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
137 #ifndef EIGEN_PARSED_BY_DOXYGEN
142 topRightCorner(NRowsType cRows, NColsType cCols)
145 (derived(), 0, cols() - internal::get_runtime_value(cCols), internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
149 template<
typename NRowsType,
typename NColsType>
150 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
151 #ifndef EIGEN_PARSED_BY_DOXYGEN
156 topRightCorner(NRowsType cRows, NColsType cCols)
const
159 (derived(), 0, cols() - internal::get_runtime_value(cCols), internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
170 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
174 template<
int CRows,
int CCols>
175 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
176 typename FixedBlockXpr<CRows,CCols>::Type topRightCorner()
178 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols);
182 template<
int CRows,
int CCols>
183 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
184 const typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner()
const
186 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols);
204 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
208 template<
int CRows,
int CCols>
209 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
210 typename FixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols)
212 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
216 template<
int CRows,
int CCols>
217 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
218 const typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols)
const
220 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
238 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
242 template<
typename NRowsType,
typename NColsType>
243 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
244 #ifndef EIGEN_PARSED_BY_DOXYGEN
249 topLeftCorner(NRowsType cRows, NColsType cCols)
252 (derived(), 0, 0, internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
256 template<
typename NRowsType,
typename NColsType>
257 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
258 #ifndef EIGEN_PARSED_BY_DOXYGEN
263 topLeftCorner(NRowsType cRows, NColsType cCols)
const
266 (derived(), 0, 0, internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
276 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
280 template<
int CRows,
int CCols>
281 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
282 typename FixedBlockXpr<CRows,CCols>::Type topLeftCorner()
284 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0);
288 template<
int CRows,
int CCols>
289 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
290 const typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner()
const
292 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0);
310 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
314 template<
int CRows,
int CCols>
315 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
316 typename FixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols)
318 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols);
322 template<
int CRows,
int CCols>
323 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
324 const typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols)
const
326 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols);
344 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
348 template<
typename NRowsType,
typename NColsType>
349 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
350 #ifndef EIGEN_PARSED_BY_DOXYGEN
355 bottomRightCorner(NRowsType cRows, NColsType cCols)
358 (derived(), rows() - internal::get_runtime_value(cRows), cols() - internal::get_runtime_value(cCols),
359 internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
363 template<
typename NRowsType,
typename NColsType>
364 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
365 #ifndef EIGEN_PARSED_BY_DOXYGEN
370 bottomRightCorner(NRowsType cRows, NColsType cCols)
const
373 (derived(), rows() - internal::get_runtime_value(cRows), cols() - internal::get_runtime_value(cCols),
374 internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
384 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
388 template<
int CRows,
int CCols>
389 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
390 typename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner()
392 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols);
396 template<
int CRows,
int CCols>
397 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
398 const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner()
const
400 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols);
418 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
422 template<
int CRows,
int CCols>
423 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
424 typename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols)
426 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
430 template<
int CRows,
int CCols>
431 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
432 const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols)
const
434 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
452 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
456 template<
typename NRowsType,
typename NColsType>
457 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
458 #ifndef EIGEN_PARSED_BY_DOXYGEN
463 bottomLeftCorner(NRowsType cRows, NColsType cCols)
466 (derived(), rows() - internal::get_runtime_value(cRows), 0,
467 internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
471 template<
typename NRowsType,
typename NColsType>
472 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
473 #ifndef EIGEN_PARSED_BY_DOXYGEN
478 bottomLeftCorner(NRowsType cRows, NColsType cCols)
const
481 (derived(), rows() - internal::get_runtime_value(cRows), 0,
482 internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
492 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
496 template<
int CRows,
int CCols>
497 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
498 typename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner()
500 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0);
504 template<
int CRows,
int CCols>
505 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
506 const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner()
const
508 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0);
526 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
530 template<
int CRows,
int CCols>
532 typename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols)
534 return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
538 template<
int CRows,
int CCols>
540 const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols)
const
542 return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
559 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
563 template<
typename NRowsType>
564 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
565 #ifndef EIGEN_PARSED_BY_DOXYGEN
573 (derived(), 0, 0, internal::get_runtime_value(n), cols());
577 template<
typename NRowsType>
578 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
579 #ifndef EIGEN_PARSED_BY_DOXYGEN
584 topRows(NRowsType n)
const
587 (derived(), 0, 0, internal::get_runtime_value(n), cols());
601 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
606 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
607 typename NRowsBlockXpr<N>::Type topRows(Index n = N)
609 return typename NRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
614 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
615 typename ConstNRowsBlockXpr<N>::Type topRows(Index n = N)
const
617 return typename ConstNRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
634 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
638 template<
typename NRowsType>
639 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
640 #ifndef EIGEN_PARSED_BY_DOXYGEN
645 bottomRows(NRowsType n)
648 (derived(), rows() - internal::get_runtime_value(n), 0, internal::get_runtime_value(n), cols());
652 template<
typename NRowsType>
653 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
654 #ifndef EIGEN_PARSED_BY_DOXYGEN
659 bottomRows(NRowsType n)
const
662 (derived(), rows() - internal::get_runtime_value(n), 0, internal::get_runtime_value(n), cols());
676 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
681 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
682 typename NRowsBlockXpr<N>::Type bottomRows(Index n = N)
684 return typename NRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
689 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
690 typename ConstNRowsBlockXpr<N>::Type bottomRows(Index n = N)
const
692 return typename ConstNRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
710 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
714 template<
typename NRowsType>
715 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
716 #ifndef EIGEN_PARSED_BY_DOXYGEN
721 middleRows(Index startRow, NRowsType n)
724 (derived(), startRow, 0, internal::get_runtime_value(n), cols());
728 template<
typename NRowsType>
729 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
730 #ifndef EIGEN_PARSED_BY_DOXYGEN
735 middleRows(Index startRow, NRowsType n)
const
738 (derived(), startRow, 0, internal::get_runtime_value(n), cols());
753 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
758 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
759 typename NRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N)
761 return typename NRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
766 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
767 typename ConstNRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N)
const
769 return typename ConstNRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
786 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
790 template<
typename NColsType>
791 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
792 #ifndef EIGEN_PARSED_BY_DOXYGEN
797 leftCols(NColsType n)
800 (derived(), 0, 0, rows(), internal::get_runtime_value(n));
804 template<
typename NColsType>
805 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
806 #ifndef EIGEN_PARSED_BY_DOXYGEN
811 leftCols(NColsType n)
const
814 (derived(), 0, 0, rows(), internal::get_runtime_value(n));
828 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
833 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
834 typename NColsBlockXpr<N>::Type leftCols(Index n = N)
836 return typename NColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
841 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
842 typename ConstNColsBlockXpr<N>::Type leftCols(Index n = N)
const
844 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
861 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
865 template<
typename NColsType>
866 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
867 #ifndef EIGEN_PARSED_BY_DOXYGEN
872 rightCols(NColsType n)
875 (derived(), 0, cols() - internal::get_runtime_value(n), rows(), internal::get_runtime_value(n));
879 template<
typename NColsType>
880 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
881 #ifndef EIGEN_PARSED_BY_DOXYGEN
886 rightCols(NColsType n)
const
889 (derived(), 0, cols() - internal::get_runtime_value(n), rows(), internal::get_runtime_value(n));
903 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
908 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
909 typename NColsBlockXpr<N>::Type rightCols(Index n = N)
911 return typename NColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
916 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
917 typename ConstNColsBlockXpr<N>::Type rightCols(Index n = N)
const
919 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
937 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
941 template<
typename NColsType>
942 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
943 #ifndef EIGEN_PARSED_BY_DOXYGEN
948 middleCols(Index startCol, NColsType numCols)
951 (derived(), 0, startCol, rows(), internal::get_runtime_value(numCols));
955 template<
typename NColsType>
956 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
957 #ifndef EIGEN_PARSED_BY_DOXYGEN
962 middleCols(Index startCol, NColsType numCols)
const
965 (derived(), 0, startCol, rows(), internal::get_runtime_value(numCols));
980 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
985 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
986 typename NColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N)
988 return typename NColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
993 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
994 typename ConstNColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N)
const
996 return typename ConstNColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
1021 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
1025 template<
int NRows,
int NCols>
1026 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1027 typename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol)
1029 return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol);
1033 template<
int NRows,
int NCols>
1034 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1035 const typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol)
const
1037 return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol);
1067 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
1071 template<
int NRows,
int NCols>
1072 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1073 typename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol,
1074 Index blockRows, Index blockCols)
1076 return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
1080 template<
int NRows,
int NCols>
1081 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1082 const typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol,
1083 Index blockRows, Index blockCols)
const
1085 return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
1093 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
1096 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1099 return ColXpr(derived(), i);
1103 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1104 ConstColXpr col(Index i)
const
1106 return ConstColXpr(derived(), i);
1114 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
1117 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1120 return RowXpr(derived(), i);
1124 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1125 ConstRowXpr row(Index i)
const
1127 return ConstRowXpr(derived(), i);
1151 template<
typename NType>
1152 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1153 #ifndef EIGEN_PARSED_BY_DOXYGEN
1158 segment(Index start, NType n)
1160 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1162 (derived(), start, internal::get_runtime_value(n));
1167 template<
typename NType>
1168 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1169 #ifndef EIGEN_PARSED_BY_DOXYGEN
1174 segment(Index start, NType n)
const
1176 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1178 (derived(), start, internal::get_runtime_value(n));
1201 template<
typename NType>
1202 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1203 #ifndef EIGEN_PARSED_BY_DOXYGEN
1210 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1212 (derived(), 0, internal::get_runtime_value(n));
1216 template<
typename NType>
1217 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1218 #ifndef EIGEN_PARSED_BY_DOXYGEN
1225 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1227 (derived(), 0, internal::get_runtime_value(n));
1250 template<
typename NType>
1251 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1252 #ifndef EIGEN_PARSED_BY_DOXYGEN
1259 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1261 (derived(), this->size() - internal::get_runtime_value(n), internal::get_runtime_value(n));
1265 template<
typename NType>
1266 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1267 #ifndef EIGEN_PARSED_BY_DOXYGEN
1274 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1276 (derived(), this->size() - internal::get_runtime_value(n), internal::get_runtime_value(n));
1296 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1297 typename FixedSegmentReturnType<N>::Type segment(Index start, Index n = N)
1299 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1300 return typename FixedSegmentReturnType<N>::Type(derived(), start, n);
1305 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1306 typename ConstFixedSegmentReturnType<N>::Type segment(Index start, Index n = N)
const
1308 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1309 return typename ConstFixedSegmentReturnType<N>::Type(derived(), start, n);
1328 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1329 typename FixedSegmentReturnType<N>::Type head(Index n = N)
1331 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1332 return typename FixedSegmentReturnType<N>::Type(derived(), 0, n);
1337 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1338 typename ConstFixedSegmentReturnType<N>::Type head(Index n = N)
const
1340 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1341 return typename ConstFixedSegmentReturnType<N>::Type(derived(), 0, n);
1360 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1361 typename FixedSegmentReturnType<N>::Type tail(Index n = N)
1363 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1364 return typename FixedSegmentReturnType<N>::Type(derived(), size() - n);
1369 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1370 typename ConstFixedSegmentReturnType<N>::Type tail(Index n = N)
const
1372 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1373 return typename ConstFixedSegmentReturnType<N>::Type(derived(), size() - n);
1379 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1380 InnerVectorReturnType innerVector(Index outer)
1381 {
return InnerVectorReturnType(derived(), outer); }
1386 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1387 const ConstInnerVectorReturnType innerVector(Index outer)
const
1388 {
return ConstInnerVectorReturnType(derived(), outer); }
1393 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1394 InnerVectorsReturnType
1395 innerVectors(Index outerStart, Index outerSize)
1397 return Block<Derived,Dynamic,Dynamic,true>(derived(),
1398 IsRowMajor ? outerStart : 0, IsRowMajor ? 0 : outerStart,
1399 IsRowMajor ? outerSize : rows(), IsRowMajor ? cols() : outerSize);
1406 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1407 const ConstInnerVectorsReturnType
1408 innerVectors(Index outerStart, Index outerSize)
const
1410 return Block<const Derived,Dynamic,Dynamic,true>(derived(),
1411 IsRowMajor ? outerStart : 0, IsRowMajor ? 0 : outerStart,
1412 IsRowMajor ? outerSize : rows(), IsRowMajor ? cols() : outerSize);
1419 template<DirectionType Direction>
1420 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1421 typename internal::conditional<Direction==Vertical,ColXpr,RowXpr>::type
1424 return typename internal::conditional<Direction==Vertical,ColXpr,RowXpr>::type(derived(),i);
1428 template<DirectionType Direction>
1429 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1430 typename internal::conditional<Direction==Vertical,ConstColXpr,ConstRowXpr>::type
1431 subVector(Index i)
const
1433 return typename internal::conditional<Direction==Vertical,ConstColXpr,ConstRowXpr>::type(derived(),i);
1439 template<DirectionType Direction>
1440 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1441 Index subVectors()
const
1442 {
return (Direction==
Vertical)?cols():rows(); }