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-2010 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 EIGEN_VECTORBLOCK_H
12 #define EIGEN_VECTORBLOCK_H
13 
14 namespace Eigen {
15 
16 namespace internal {
17 template<typename VectorType, int Size>
18 struct traits<VectorBlock<VectorType, Size> >
19  : public traits<Block<VectorType,
20  traits<VectorType>::Flags & RowMajorBit ? 1 : Size,
21  traits<VectorType>::Flags & RowMajorBit ? Size : 1> >
22 {
23 };
24 }
25 
56 template<typename VectorType, int Size> class VectorBlock
57  : public Block<VectorType,
58  internal::traits<VectorType>::Flags & RowMajorBit ? 1 : Size,
59  internal::traits<VectorType>::Flags & RowMajorBit ? Size : 1>
60 {
61  typedef Block<VectorType,
64  enum {
66  };
67  public:
69 
70  using Base::operator=;
71 
75  VectorBlock(VectorType& vector, Index start, Index size)
76  : Base(vector,
77  IsColVector ? start : 0, IsColVector ? 0 : start,
78  IsColVector ? size : 1, IsColVector ? 1 : size)
79  {
81  }
82 
86  VectorBlock(VectorType& vector, Index start)
87  : Base(vector, IsColVector ? start : 0, IsColVector ? 0 : start)
88  {
90  }
91 };
92 
93 
94 } // end namespace Eigen
95 
96 #endif // EIGEN_VECTORBLOCK_H
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
Block< VectorType, internal::traits< VectorType >::Flags &RowMajorBit ? 1 :Size, internal::traits< VectorType >::Flags &RowMajorBit ? Size :1 > Base
Definition: VectorBlock.h:63
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE VectorBlock(VectorType &vector, Index start)
Definition: VectorBlock.h:86
const unsigned int RowMajorBit
Definition: Constants.h:66
Expression of a fixed-size or dynamic-size sub-vector.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE VectorBlock(VectorType &vector, Index start, Index size)
Definition: VectorBlock.h:75
EIGEN_CONSTEXPR Index size(const T &x)
Definition: Meta.h:479
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:103
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
Definition: Macros.h:1283
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition: StaticAssert.h:142


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:43