VectorBlock.h
Go to the documentation of this file.
00001 // This file is part of Eigen, a lightweight C++ template library
00002 // for linear algebra.
00003 //
00004 // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
00005 // Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
00006 //
00007 // Eigen is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU Lesser General Public
00009 // License as published by the Free Software Foundation; either
00010 // version 3 of the License, or (at your option) any later version.
00011 //
00012 // Alternatively, you can redistribute it and/or
00013 // modify it under the terms of the GNU General Public License as
00014 // published by the Free Software Foundation; either version 2 of
00015 // the License, or (at your option) any later version.
00016 //
00017 // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
00018 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00019 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
00020 // GNU General Public License for more details.
00021 //
00022 // You should have received a copy of the GNU Lesser General Public
00023 // License and a copy of the GNU General Public License along with
00024 // Eigen. If not, see <http://www.gnu.org/licenses/>.
00025 
00026 #ifndef EIGEN2_VECTORBLOCK_H
00027 #define EIGEN2_VECTORBLOCK_H
00028 
00030 template<typename Derived>
00031 inline VectorBlock<Derived>
00032 MatrixBase<Derived>::start(Index size)
00033 {
00034   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00035   return VectorBlock<Derived>(derived(), 0, size);
00036 }
00037 
00039 template<typename Derived>
00040 inline const VectorBlock<const Derived>
00041 MatrixBase<Derived>::start(Index size) const
00042 {
00043   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00044   return VectorBlock<const Derived>(derived(), 0, size);
00045 }
00046 
00048 template<typename Derived>
00049 inline VectorBlock<Derived>
00050 MatrixBase<Derived>::end(Index size)
00051 {
00052   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00053   return VectorBlock<Derived>(derived(), this->size() - size, size);
00054 }
00055 
00057 template<typename Derived>
00058 inline const VectorBlock<const Derived>
00059 MatrixBase<Derived>::end(Index size) const
00060 {
00061   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00062   return VectorBlock<const Derived>(derived(), this->size() - size, size);
00063 }
00064 
00066 template<typename Derived>
00067 template<int Size>
00068 inline VectorBlock<Derived,Size>
00069 MatrixBase<Derived>::start()
00070 {
00071   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00072   return VectorBlock<Derived,Size>(derived(), 0);
00073 }
00074 
00076 template<typename Derived>
00077 template<int Size>
00078 inline const VectorBlock<const Derived,Size>
00079 MatrixBase<Derived>::start() const
00080 {
00081   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00082   return VectorBlock<const Derived,Size>(derived(), 0);
00083 }
00084 
00086 template<typename Derived>
00087 template<int Size>
00088 inline VectorBlock<Derived,Size>
00089 MatrixBase<Derived>::end()
00090 {
00091   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00092   return VectorBlock<Derived, Size>(derived(), size() - Size);
00093 }
00094 
00096 template<typename Derived>
00097 template<int Size>
00098 inline const VectorBlock<const Derived,Size>
00099 MatrixBase<Derived>::end() const
00100 {
00101   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00102   return VectorBlock<const Derived, Size>(derived(), size() - Size);
00103 }
00104 
00105 #endif // EIGEN2_VECTORBLOCK_H


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:33:40