compbio
BlockMethods.h
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
5 // Copyright (C) 2006-2010 Benoit Jacob <jacob.benoit.1@gmail.com>
6 //
7 // This Source Code Form is subject to the terms of the Mozilla
8 // Public License v. 2.0. If a copy of the MPL was not distributed
9 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11 #ifndef EIGEN_PARSED_BY_DOXYGEN
12 
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; };
37 
38 typedef VectorBlock<Derived> SegmentReturnType;
39 typedef const VectorBlock<const Derived> ConstSegmentReturnType;
40 template<int Size> struct FixedSegmentReturnType { typedef VectorBlock<Derived, Size> Type; };
41 template<int Size> struct ConstFixedSegmentReturnType { typedef const VectorBlock<const Derived, Size> Type; };
42 
43 #endif // not EIGEN_PARSED_BY_DOXYGEN
44 
59 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
63 EIGEN_DEVICE_FUNC
64 inline BlockXpr block(Index startRow, Index startCol, Index blockRows, Index blockCols)
65 {
66  return BlockXpr(derived(), startRow, startCol, blockRows, blockCols);
67 }
68 
70 EIGEN_DEVICE_FUNC
71 inline const ConstBlockXpr block(Index startRow, Index startCol, Index blockRows, Index blockCols) const
72 {
73  return ConstBlockXpr(derived(), startRow, startCol, blockRows, blockCols);
74 }
75 
76 
77 
78 
87 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
91 EIGEN_DEVICE_FUNC
92 inline BlockXpr topRightCorner(Index cRows, Index cCols)
93 {
94  return BlockXpr(derived(), 0, cols() - cCols, cRows, cCols);
95 }
96 
98 EIGEN_DEVICE_FUNC
99 inline const ConstBlockXpr topRightCorner(Index cRows, Index cCols) const
100 {
101  return ConstBlockXpr(derived(), 0, cols() - cCols, cRows, cCols);
102 }
103 
112 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
116 template<int CRows, int CCols>
117 EIGEN_DEVICE_FUNC
118 inline typename FixedBlockXpr<CRows,CCols>::Type topRightCorner()
119 {
120  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols);
121 }
122 
124 template<int CRows, int CCols>
125 EIGEN_DEVICE_FUNC
126 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner() const
127 {
128  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols);
129 }
130 
146 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
150 template<int CRows, int CCols>
151 inline typename FixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols)
152 {
153  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
154 }
155 
157 template<int CRows, int CCols>
158 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols) const
159 {
160  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
161 }
162 
163 
164 
173 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
177 EIGEN_DEVICE_FUNC
178 inline BlockXpr topLeftCorner(Index cRows, Index cCols)
179 {
180  return BlockXpr(derived(), 0, 0, cRows, cCols);
181 }
182 
184 EIGEN_DEVICE_FUNC
185 inline const ConstBlockXpr topLeftCorner(Index cRows, Index cCols) const
186 {
187  return ConstBlockXpr(derived(), 0, 0, cRows, cCols);
188 }
189 
197 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
201 template<int CRows, int CCols>
202 EIGEN_DEVICE_FUNC
203 inline typename FixedBlockXpr<CRows,CCols>::Type topLeftCorner()
204 {
205  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0);
206 }
207 
209 template<int CRows, int CCols>
210 EIGEN_DEVICE_FUNC
211 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner() const
212 {
213  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0);
214 }
215 
231 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
235 template<int CRows, int CCols>
236 inline typename FixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols)
237 {
238  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols);
239 }
240 
242 template<int CRows, int CCols>
243 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols) const
244 {
245  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols);
246 }
247 
248 
249 
258 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
262 EIGEN_DEVICE_FUNC
263 inline BlockXpr bottomRightCorner(Index cRows, Index cCols)
264 {
265  return BlockXpr(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
266 }
267 
269 EIGEN_DEVICE_FUNC
270 inline const ConstBlockXpr bottomRightCorner(Index cRows, Index cCols) const
271 {
272  return ConstBlockXpr(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
273 }
274 
282 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
286 template<int CRows, int CCols>
287 EIGEN_DEVICE_FUNC
288 inline typename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner()
289 {
290  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols);
291 }
292 
294 template<int CRows, int CCols>
295 EIGEN_DEVICE_FUNC
296 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner() const
297 {
298  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols);
299 }
300 
316 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
320 template<int CRows, int CCols>
321 inline typename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols)
322 {
323  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
324 }
325 
327 template<int CRows, int CCols>
328 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols) const
329 {
330  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
331 }
332 
333 
334 
343 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
347 EIGEN_DEVICE_FUNC
348 inline BlockXpr bottomLeftCorner(Index cRows, Index cCols)
349 {
350  return BlockXpr(derived(), rows() - cRows, 0, cRows, cCols);
351 }
352 
354 EIGEN_DEVICE_FUNC
355 inline const ConstBlockXpr bottomLeftCorner(Index cRows, Index cCols) const
356 {
357  return ConstBlockXpr(derived(), rows() - cRows, 0, cRows, cCols);
358 }
359 
367 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
371 template<int CRows, int CCols>
372 EIGEN_DEVICE_FUNC
373 inline typename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner()
374 {
375  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0);
376 }
377 
379 template<int CRows, int CCols>
380 EIGEN_DEVICE_FUNC
381 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner() const
382 {
383  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0);
384 }
385 
401 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
405 template<int CRows, int CCols>
406 inline typename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols)
407 {
408  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
409 }
410 
412 template<int CRows, int CCols>
413 inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols) const
414 {
415  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
416 }
417 
418 
419 
427 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
431 EIGEN_DEVICE_FUNC
432 inline RowsBlockXpr topRows(Index n)
433 {
434  return RowsBlockXpr(derived(), 0, 0, n, cols());
435 }
436 
438 EIGEN_DEVICE_FUNC
439 inline ConstRowsBlockXpr topRows(Index n) const
440 {
441  return ConstRowsBlockXpr(derived(), 0, 0, n, cols());
442 }
443 
455 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
459 template<int N>
460 EIGEN_DEVICE_FUNC
461 inline typename NRowsBlockXpr<N>::Type topRows(Index n = N)
462 {
463  return typename NRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
464 }
465 
467 template<int N>
468 EIGEN_DEVICE_FUNC
469 inline typename ConstNRowsBlockXpr<N>::Type topRows(Index n = N) const
470 {
471  return typename ConstNRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
472 }
473 
474 
475 
483 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
487 EIGEN_DEVICE_FUNC
488 inline RowsBlockXpr bottomRows(Index n)
489 {
490  return RowsBlockXpr(derived(), rows() - n, 0, n, cols());
491 }
492 
494 EIGEN_DEVICE_FUNC
495 inline ConstRowsBlockXpr bottomRows(Index n) const
496 {
497  return ConstRowsBlockXpr(derived(), rows() - n, 0, n, cols());
498 }
499 
511 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
515 template<int N>
516 EIGEN_DEVICE_FUNC
517 inline typename NRowsBlockXpr<N>::Type bottomRows(Index n = N)
518 {
519  return typename NRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
520 }
521 
523 template<int N>
524 EIGEN_DEVICE_FUNC
525 inline typename ConstNRowsBlockXpr<N>::Type bottomRows(Index n = N) const
526 {
527  return typename ConstNRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
528 }
529 
530 
531 
540 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
544 EIGEN_DEVICE_FUNC
545 inline RowsBlockXpr middleRows(Index startRow, Index n)
546 {
547  return RowsBlockXpr(derived(), startRow, 0, n, cols());
548 }
549 
551 EIGEN_DEVICE_FUNC
552 inline ConstRowsBlockXpr middleRows(Index startRow, Index n) const
553 {
554  return ConstRowsBlockXpr(derived(), startRow, 0, n, cols());
555 }
556 
569 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
573 template<int N>
574 EIGEN_DEVICE_FUNC
575 inline typename NRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N)
576 {
577  return typename NRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
578 }
579 
581 template<int N>
582 EIGEN_DEVICE_FUNC
583 inline typename ConstNRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N) const
584 {
585  return typename ConstNRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
586 }
587 
588 
589 
597 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
601 EIGEN_DEVICE_FUNC
602 inline ColsBlockXpr leftCols(Index n)
603 {
604  return ColsBlockXpr(derived(), 0, 0, rows(), n);
605 }
606 
608 EIGEN_DEVICE_FUNC
609 inline ConstColsBlockXpr leftCols(Index n) const
610 {
611  return ConstColsBlockXpr(derived(), 0, 0, rows(), n);
612 }
613 
625 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
629 template<int N>
630 EIGEN_DEVICE_FUNC
631 inline typename NColsBlockXpr<N>::Type leftCols(Index n = N)
632 {
633  return typename NColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
634 }
635 
637 template<int N>
638 EIGEN_DEVICE_FUNC
639 inline typename ConstNColsBlockXpr<N>::Type leftCols(Index n = N) const
640 {
641  return typename ConstNColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
642 }
643 
644 
645 
653 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
657 EIGEN_DEVICE_FUNC
658 inline ColsBlockXpr rightCols(Index n)
659 {
660  return ColsBlockXpr(derived(), 0, cols() - n, rows(), n);
661 }
662 
664 EIGEN_DEVICE_FUNC
665 inline ConstColsBlockXpr rightCols(Index n) const
666 {
667  return ConstColsBlockXpr(derived(), 0, cols() - n, rows(), n);
668 }
669 
681 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
685 template<int N>
686 EIGEN_DEVICE_FUNC
687 inline typename NColsBlockXpr<N>::Type rightCols(Index n = N)
688 {
689  return typename NColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
690 }
691 
693 template<int N>
694 EIGEN_DEVICE_FUNC
695 inline typename ConstNColsBlockXpr<N>::Type rightCols(Index n = N) const
696 {
697  return typename ConstNColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
698 }
699 
700 
701 
710 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
714 EIGEN_DEVICE_FUNC
715 inline ColsBlockXpr middleCols(Index startCol, Index numCols)
716 {
717  return ColsBlockXpr(derived(), 0, startCol, rows(), numCols);
718 }
719 
721 EIGEN_DEVICE_FUNC
722 inline ConstColsBlockXpr middleCols(Index startCol, Index numCols) const
723 {
724  return ConstColsBlockXpr(derived(), 0, startCol, rows(), numCols);
725 }
726 
739 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
743 template<int N>
744 EIGEN_DEVICE_FUNC
745 inline typename NColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N)
746 {
747  return typename NColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
748 }
749 
751 template<int N>
752 EIGEN_DEVICE_FUNC
753 inline typename ConstNColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N) const
754 {
755  return typename ConstNColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
756 }
757 
758 
759 
774 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
778 template<int NRows, int NCols>
779 EIGEN_DEVICE_FUNC
780 inline typename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol)
781 {
782  return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol);
783 }
784 
786 template<int NRows, int NCols>
787 EIGEN_DEVICE_FUNC
788 inline const typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol) const
789 {
790  return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol);
791 }
792 
810 EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
814 template<int NRows, int NCols>
815 inline typename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol,
816  Index blockRows, Index blockCols)
817 {
818  return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
819 }
820 
822 template<int NRows, int NCols>
823 inline const typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol,
824  Index blockRows, Index blockCols) const
825 {
826  return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
827 }
828 
834 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
837 EIGEN_DEVICE_FUNC
838 inline ColXpr col(Index i)
839 {
840  return ColXpr(derived(), i);
841 }
842 
844 EIGEN_DEVICE_FUNC
845 inline ConstColXpr col(Index i) const
846 {
847  return ConstColXpr(derived(), i);
848 }
849 
855 EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
858 EIGEN_DEVICE_FUNC
859 inline RowXpr row(Index i)
860 {
861  return RowXpr(derived(), i);
862 }
863 
865 EIGEN_DEVICE_FUNC
866 inline ConstRowXpr row(Index i) const
867 {
868  return ConstRowXpr(derived(), i);
869 }
870 
887 EIGEN_DEVICE_FUNC
888 inline SegmentReturnType segment(Index start, Index n)
889 {
890  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
891  return SegmentReturnType(derived(), start, n);
892 }
893 
894 
896 EIGEN_DEVICE_FUNC
897 inline ConstSegmentReturnType segment(Index start, Index n) const
898 {
899  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
900  return ConstSegmentReturnType(derived(), start, n);
901 }
902 
918 EIGEN_DEVICE_FUNC
919 inline SegmentReturnType head(Index n)
920 {
921  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
922  return SegmentReturnType(derived(), 0, n);
923 }
924 
926 EIGEN_DEVICE_FUNC
927 inline ConstSegmentReturnType head(Index n) const
928 {
929  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
930  return ConstSegmentReturnType(derived(), 0, n);
931 }
932 
948 EIGEN_DEVICE_FUNC
949 inline SegmentReturnType tail(Index n)
950 {
951  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
952  return SegmentReturnType(derived(), this->size() - n, n);
953 }
954 
956 EIGEN_DEVICE_FUNC
957 inline ConstSegmentReturnType tail(Index n) const
958 {
959  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
960  return ConstSegmentReturnType(derived(), this->size() - n, n);
961 }
962 
979 template<int N>
980 EIGEN_DEVICE_FUNC
981 inline typename FixedSegmentReturnType<N>::Type segment(Index start, Index n = N)
982 {
983  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
984  return typename FixedSegmentReturnType<N>::Type(derived(), start, n);
985 }
986 
988 template<int N>
989 EIGEN_DEVICE_FUNC
990 inline typename ConstFixedSegmentReturnType<N>::Type segment(Index start, Index n = N) const
991 {
992  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
993  return typename ConstFixedSegmentReturnType<N>::Type(derived(), start, n);
994 }
995 
1011 template<int N>
1012 EIGEN_DEVICE_FUNC
1013 inline typename FixedSegmentReturnType<N>::Type head(Index n = N)
1014 {
1015  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1016  return typename FixedSegmentReturnType<N>::Type(derived(), 0, n);
1017 }
1018 
1020 template<int N>
1021 EIGEN_DEVICE_FUNC
1022 inline typename ConstFixedSegmentReturnType<N>::Type head(Index n = N) const
1023 {
1024  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1025  return typename ConstFixedSegmentReturnType<N>::Type(derived(), 0, n);
1026 }
1027 
1043 template<int N>
1044 EIGEN_DEVICE_FUNC
1045 inline typename FixedSegmentReturnType<N>::Type tail(Index n = N)
1046 {
1047  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1048  return typename FixedSegmentReturnType<N>::Type(derived(), size() - n);
1049 }
1050 
1052 template<int N>
1053 EIGEN_DEVICE_FUNC
1054 inline typename ConstFixedSegmentReturnType<N>::Type tail(Index n = N) const
1055 {
1056  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1057  return typename ConstFixedSegmentReturnType<N>::Type(derived(), size() - n);
1058 }
Definition: BlockMethods.h:35
Definition: BlockMethods.h:40
Definition: BlockMethods.h:30
Definition: BlockMethods.h:41
Definition: BlockMethods.h:36
Definition: BlockMethods.h:27
Definition: BlockMethods.h:26
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:103
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time, and that instead the value is stored in some runtime variable.
Definition: Constants.h:21
Definition: BlockMethods.h:29