Eigen2Support/VectorBlock.h
Go to the documentation of this file.
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 // This Source Code Form is subject to the terms of the Mozilla
8 // Public License v. 2.0. If a copy of the MPL was not distributed
9 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11 #ifndef EIGEN2_VECTORBLOCK_H
12 #define EIGEN2_VECTORBLOCK_H
13 
14 namespace Eigen {
15 
17 template<typename Derived>
18 inline VectorBlock<Derived>
19 MatrixBase<Derived>::start(Index size)
20 {
22  return VectorBlock<Derived>(derived(), 0, size);
23 }
24 
26 template<typename Derived>
27 inline const VectorBlock<const Derived>
28 MatrixBase<Derived>::start(Index size) const
29 {
31  return VectorBlock<const Derived>(derived(), 0, size);
32 }
33 
35 template<typename Derived>
36 inline VectorBlock<Derived>
37 MatrixBase<Derived>::end(Index size)
38 {
40  return VectorBlock<Derived>(derived(), this->size() - size, size);
41 }
42 
44 template<typename Derived>
45 inline const VectorBlock<const Derived>
46 MatrixBase<Derived>::end(Index size) const
47 {
49  return VectorBlock<const Derived>(derived(), this->size() - size, size);
50 }
51 
53 template<typename Derived>
54 template<int Size>
55 inline VectorBlock<Derived,Size>
56 MatrixBase<Derived>::start()
57 {
59  return VectorBlock<Derived,Size>(derived(), 0);
60 }
61 
63 template<typename Derived>
64 template<int Size>
65 inline const VectorBlock<const Derived,Size>
66 MatrixBase<Derived>::start() const
67 {
69  return VectorBlock<const Derived,Size>(derived(), 0);
70 }
71 
73 template<typename Derived>
74 template<int Size>
75 inline VectorBlock<Derived,Size>
76 MatrixBase<Derived>::end()
77 {
79  return VectorBlock<Derived, Size>(derived(), size() - Size);
80 }
81 
83 template<typename Derived>
84 template<int Size>
85 inline const VectorBlock<const Derived,Size>
86 MatrixBase<Derived>::end() const
87 {
89  return VectorBlock<const Derived, Size>(derived(), size() - Size);
90 }
91 
92 } // end namespace Eigen
93 
94 #endif // EIGEN2_VECTORBLOCK_H
#define inline
Definition: Types.h:109
iterative scaling algorithm to equilibrate rows and column norms in matrices
Definition: matrix.hpp:471
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition: StaticAssert.h:126


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:16