~choreonoid/choreonoid/debian

« back to all changes in this revision

Viewing changes to thirdparty/eigen3/Eigen/src/Eigen2Support/VectorBlock.h

  • Committer: Thomas Moulard
  • Date: 2012-10-23 12:43:24 UTC
  • Revision ID: git-v1:351cf736ad49bc7a9a7b9767dee760a013517a5d
Tags: upstream/1.1.0
ImportedĀ UpstreamĀ versionĀ 1.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
// 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.
 
11
//
 
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.
 
16
//
 
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.
 
21
//
 
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/>.
 
25
 
 
26
#ifndef EIGEN2_VECTORBLOCK_H
 
27
#define EIGEN2_VECTORBLOCK_H
 
28
 
 
29
/** \deprecated use DenseMase::head(Index) */
 
30
template<typename Derived>
 
31
inline VectorBlock<Derived>
 
32
MatrixBase<Derived>::start(Index size)
 
33
{
 
34
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
 
35
  return VectorBlock<Derived>(derived(), 0, size);
 
36
}
 
37
 
 
38
/** \deprecated use DenseMase::head(Index) */
 
39
template<typename Derived>
 
40
inline const VectorBlock<const Derived>
 
41
MatrixBase<Derived>::start(Index size) const
 
42
{
 
43
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
 
44
  return VectorBlock<const Derived>(derived(), 0, size);
 
45
}
 
46
 
 
47
/** \deprecated use DenseMase::tail(Index) */
 
48
template<typename Derived>
 
49
inline VectorBlock<Derived>
 
50
MatrixBase<Derived>::end(Index size)
 
51
{
 
52
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
 
53
  return VectorBlock<Derived>(derived(), this->size() - size, size);
 
54
}
 
55
 
 
56
/** \deprecated use DenseMase::tail(Index) */
 
57
template<typename Derived>
 
58
inline const VectorBlock<const Derived>
 
59
MatrixBase<Derived>::end(Index size) const
 
60
{
 
61
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
 
62
  return VectorBlock<const Derived>(derived(), this->size() - size, size);
 
63
}
 
64
 
 
65
/** \deprecated use DenseMase::head() */
 
66
template<typename Derived>
 
67
template<int Size>
 
68
inline VectorBlock<Derived,Size>
 
69
MatrixBase<Derived>::start()
 
70
{
 
71
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
 
72
  return VectorBlock<Derived,Size>(derived(), 0);
 
73
}
 
74
 
 
75
/** \deprecated use DenseMase::head() */
 
76
template<typename Derived>
 
77
template<int Size>
 
78
inline const VectorBlock<const Derived,Size>
 
79
MatrixBase<Derived>::start() const
 
80
{
 
81
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
 
82
  return VectorBlock<const Derived,Size>(derived(), 0);
 
83
}
 
84
 
 
85
/** \deprecated use DenseMase::tail() */
 
86
template<typename Derived>
 
87
template<int Size>
 
88
inline VectorBlock<Derived,Size>
 
89
MatrixBase<Derived>::end()
 
90
{
 
91
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
 
92
  return VectorBlock<Derived, Size>(derived(), size() - Size);
 
93
}
 
94
 
 
95
/** \deprecated use DenseMase::tail() */
 
96
template<typename Derived>
 
97
template<int Size>
 
98
inline const VectorBlock<const Derived,Size>
 
99
MatrixBase<Derived>::end() const
 
100
{
 
101
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
 
102
  return VectorBlock<const Derived, Size>(derived(), size() - Size);
 
103
}
 
104
 
 
105
#endif // EIGEN2_VECTORBLOCK_H