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 // This Source Code Form is subject to the terms of the Mozilla
00008 // Public License v. 2.0. If a copy of the MPL was not distributed
00009 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
00010 
00011 #ifndef EIGEN2_VECTORBLOCK_H
00012 #define EIGEN2_VECTORBLOCK_H
00013 
00014 namespace Eigen { 
00015 
00017 template<typename Derived>
00018 inline VectorBlock<Derived>
00019 MatrixBase<Derived>::start(Index size)
00020 {
00021   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00022   return VectorBlock<Derived>(derived(), 0, size);
00023 }
00024 
00026 template<typename Derived>
00027 inline const VectorBlock<const Derived>
00028 MatrixBase<Derived>::start(Index size) const
00029 {
00030   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00031   return VectorBlock<const Derived>(derived(), 0, size);
00032 }
00033 
00035 template<typename Derived>
00036 inline VectorBlock<Derived>
00037 MatrixBase<Derived>::end(Index size)
00038 {
00039   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00040   return VectorBlock<Derived>(derived(), this->size() - size, size);
00041 }
00042 
00044 template<typename Derived>
00045 inline const VectorBlock<const Derived>
00046 MatrixBase<Derived>::end(Index size) const
00047 {
00048   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00049   return VectorBlock<const Derived>(derived(), this->size() - size, size);
00050 }
00051 
00053 template<typename Derived>
00054 template<int Size>
00055 inline VectorBlock<Derived,Size>
00056 MatrixBase<Derived>::start()
00057 {
00058   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00059   return VectorBlock<Derived,Size>(derived(), 0);
00060 }
00061 
00063 template<typename Derived>
00064 template<int Size>
00065 inline const VectorBlock<const Derived,Size>
00066 MatrixBase<Derived>::start() const
00067 {
00068   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00069   return VectorBlock<const Derived,Size>(derived(), 0);
00070 }
00071 
00073 template<typename Derived>
00074 template<int Size>
00075 inline VectorBlock<Derived,Size>
00076 MatrixBase<Derived>::end()
00077 {
00078   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00079   return VectorBlock<Derived, Size>(derived(), size() - Size);
00080 }
00081 
00083 template<typename Derived>
00084 template<int Size>
00085 inline const VectorBlock<const Derived,Size>
00086 MatrixBase<Derived>::end() const
00087 {
00088   EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
00089   return VectorBlock<const Derived, Size>(derived(), size() - Size);
00090 }
00091 
00092 } // end namespace Eigen
00093 
00094 #endif // EIGEN2_VECTORBLOCK_H


win_eigen
Author(s): Daniel Stonier
autogenerated on Wed Sep 16 2015 07:12:39