1 | // This file is part of Eigen, a lightweight C++ template library |
---|
2 | // for linear algebra. |
---|
3 | // |
---|
4 | // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr> |
---|
5 | // Copyright (C) 2006-2008 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 EIGEN2_VECTORBLOCK_H |
---|
12 | #define EIGEN2_VECTORBLOCK_H |
---|
13 | |
---|
14 | namespace Eigen { |
---|
15 | |
---|
16 | /** \deprecated use DenseMase::head(Index) */ |
---|
17 | template<typename Derived> |
---|
18 | inline VectorBlock<Derived> |
---|
19 | MatrixBase<Derived>::start(Index size) |
---|
20 | { |
---|
21 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) |
---|
22 | return VectorBlock<Derived>(derived(), 0, size); |
---|
23 | } |
---|
24 | |
---|
25 | /** \deprecated use DenseMase::head(Index) */ |
---|
26 | template<typename Derived> |
---|
27 | inline const VectorBlock<const Derived> |
---|
28 | MatrixBase<Derived>::start(Index size) const |
---|
29 | { |
---|
30 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) |
---|
31 | return VectorBlock<const Derived>(derived(), 0, size); |
---|
32 | } |
---|
33 | |
---|
34 | /** \deprecated use DenseMase::tail(Index) */ |
---|
35 | template<typename Derived> |
---|
36 | inline VectorBlock<Derived> |
---|
37 | MatrixBase<Derived>::end(Index size) |
---|
38 | { |
---|
39 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) |
---|
40 | return VectorBlock<Derived>(derived(), this->size() - size, size); |
---|
41 | } |
---|
42 | |
---|
43 | /** \deprecated use DenseMase::tail(Index) */ |
---|
44 | template<typename Derived> |
---|
45 | inline const VectorBlock<const Derived> |
---|
46 | MatrixBase<Derived>::end(Index size) const |
---|
47 | { |
---|
48 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) |
---|
49 | return VectorBlock<const Derived>(derived(), this->size() - size, size); |
---|
50 | } |
---|
51 | |
---|
52 | /** \deprecated use DenseMase::head() */ |
---|
53 | template<typename Derived> |
---|
54 | template<int Size> |
---|
55 | inline VectorBlock<Derived,Size> |
---|
56 | MatrixBase<Derived>::start() |
---|
57 | { |
---|
58 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) |
---|
59 | return VectorBlock<Derived,Size>(derived(), 0); |
---|
60 | } |
---|
61 | |
---|
62 | /** \deprecated use DenseMase::head() */ |
---|
63 | template<typename Derived> |
---|
64 | template<int Size> |
---|
65 | inline const VectorBlock<const Derived,Size> |
---|
66 | MatrixBase<Derived>::start() const |
---|
67 | { |
---|
68 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) |
---|
69 | return VectorBlock<const Derived,Size>(derived(), 0); |
---|
70 | } |
---|
71 | |
---|
72 | /** \deprecated use DenseMase::tail() */ |
---|
73 | template<typename Derived> |
---|
74 | template<int Size> |
---|
75 | inline VectorBlock<Derived,Size> |
---|
76 | MatrixBase<Derived>::end() |
---|
77 | { |
---|
78 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) |
---|
79 | return VectorBlock<Derived, Size>(derived(), size() - Size); |
---|
80 | } |
---|
81 | |
---|
82 | /** \deprecated use DenseMase::tail() */ |
---|
83 | template<typename Derived> |
---|
84 | template<int Size> |
---|
85 | inline const VectorBlock<const Derived,Size> |
---|
86 | MatrixBase<Derived>::end() const |
---|
87 | { |
---|
88 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) |
---|
89 | return VectorBlock<const Derived, Size>(derived(), size() - Size); |
---|
90 | } |
---|
91 | |
---|
92 | } // end namespace Eigen |
---|
93 | |
---|
94 | #endif // EIGEN2_VECTORBLOCK_H |
---|