VectorBlock.h 2.6 KB
Newer Older
LM's avatar
LM committed
1 2 3 4 5 6
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
//
Don Gagne's avatar
Don Gagne committed
7 8 9
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
LM's avatar
LM committed
10 11 12 13

#ifndef EIGEN2_VECTORBLOCK_H
#define EIGEN2_VECTORBLOCK_H

Don Gagne's avatar
Don Gagne committed
14 15
namespace Eigen { 

LM's avatar
LM committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
/** \deprecated use DenseMase::head(Index) */
template<typename Derived>
inline VectorBlock<Derived>
MatrixBase<Derived>::start(Index size)
{
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
  return VectorBlock<Derived>(derived(), 0, size);
}

/** \deprecated use DenseMase::head(Index) */
template<typename Derived>
inline const VectorBlock<const Derived>
MatrixBase<Derived>::start(Index size) const
{
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
  return VectorBlock<const Derived>(derived(), 0, size);
}

/** \deprecated use DenseMase::tail(Index) */
template<typename Derived>
inline VectorBlock<Derived>
MatrixBase<Derived>::end(Index size)
{
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
  return VectorBlock<Derived>(derived(), this->size() - size, size);
}

/** \deprecated use DenseMase::tail(Index) */
template<typename Derived>
inline const VectorBlock<const Derived>
MatrixBase<Derived>::end(Index size) const
{
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
  return VectorBlock<const Derived>(derived(), this->size() - size, size);
}

/** \deprecated use DenseMase::head() */
template<typename Derived>
template<int Size>
inline VectorBlock<Derived,Size>
MatrixBase<Derived>::start()
{
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
  return VectorBlock<Derived,Size>(derived(), 0);
}

/** \deprecated use DenseMase::head() */
template<typename Derived>
template<int Size>
inline const VectorBlock<const Derived,Size>
MatrixBase<Derived>::start() const
{
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
  return VectorBlock<const Derived,Size>(derived(), 0);
}

/** \deprecated use DenseMase::tail() */
template<typename Derived>
template<int Size>
inline VectorBlock<Derived,Size>
MatrixBase<Derived>::end()
{
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
  return VectorBlock<Derived, Size>(derived(), size() - Size);
}

/** \deprecated use DenseMase::tail() */
template<typename Derived>
template<int Size>
inline const VectorBlock<const Derived,Size>
MatrixBase<Derived>::end() const
{
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
  return VectorBlock<const Derived, Size>(derived(), size() - Size);
}

Don Gagne's avatar
Don Gagne committed
92 93
} // end namespace Eigen

LM's avatar
LM committed
94
#endif // EIGEN2_VECTORBLOCK_H