1
// This file is part of Eigen, a lightweight C++ template library
4
// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
5
// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
7
// Eigen is free software; you can redistribute it and/or
8
// modify it under the terms of the GNU Lesser General Public
9
// License as published by the Free Software Foundation; either
10
// version 3 of the License, or (at your option) any later version.
12
// Alternatively, you can redistribute it and/or
13
// modify it under the terms of the GNU General Public License as
14
// published by the Free Software Foundation; either version 2 of
15
// the License, or (at your option) any later version.
17
// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
18
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
20
// GNU General Public License for more details.
22
// You should have received a copy of the GNU Lesser General Public
23
// License and a copy of the GNU General Public License along with
24
// Eigen. If not, see <http://www.gnu.org/licenses/>.
26
#ifndef EIGEN2_VECTORBLOCK_H
27
#define EIGEN2_VECTORBLOCK_H
29
/** \deprecated use DenseMase::head(Index) */
30
template<typename Derived>
31
inline VectorBlock<Derived>
32
MatrixBase<Derived>::start(Index size)
34
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
35
return VectorBlock<Derived>(derived(), 0, size);
38
/** \deprecated use DenseMase::head(Index) */
39
template<typename Derived>
40
inline const VectorBlock<const Derived>
41
MatrixBase<Derived>::start(Index size) const
43
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
44
return VectorBlock<const Derived>(derived(), 0, size);
47
/** \deprecated use DenseMase::tail(Index) */
48
template<typename Derived>
49
inline VectorBlock<Derived>
50
MatrixBase<Derived>::end(Index size)
52
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
53
return VectorBlock<Derived>(derived(), this->size() - size, size);
56
/** \deprecated use DenseMase::tail(Index) */
57
template<typename Derived>
58
inline const VectorBlock<const Derived>
59
MatrixBase<Derived>::end(Index size) const
61
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
62
return VectorBlock<const Derived>(derived(), this->size() - size, size);
65
/** \deprecated use DenseMase::head() */
66
template<typename Derived>
68
inline VectorBlock<Derived,Size>
69
MatrixBase<Derived>::start()
71
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
72
return VectorBlock<Derived,Size>(derived(), 0);
75
/** \deprecated use DenseMase::head() */
76
template<typename Derived>
78
inline const VectorBlock<const Derived,Size>
79
MatrixBase<Derived>::start() const
81
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
82
return VectorBlock<const Derived,Size>(derived(), 0);
85
/** \deprecated use DenseMase::tail() */
86
template<typename Derived>
88
inline VectorBlock<Derived,Size>
89
MatrixBase<Derived>::end()
91
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
92
return VectorBlock<Derived, Size>(derived(), size() - Size);
95
/** \deprecated use DenseMase::tail() */
96
template<typename Derived>
98
inline const VectorBlock<const Derived,Size>
99
MatrixBase<Derived>::end() const
101
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
102
return VectorBlock<const Derived, Size>(derived(), size() - Size);
105
#endif // EIGEN2_VECTORBLOCK_H