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 
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
EIGEN_DEVICE_FUNC
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Eigen::Block
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:103
Eigen::RowMajorBit
const unsigned int RowMajorBit
Definition: Constants.h:66
EIGEN_DENSE_PUBLIC_INTERFACE
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
Definition: Macros.h:1283
EIGEN_STATIC_ASSERT_VECTOR_ONLY
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition: StaticAssert.h:142
size
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
Eigen::VectorBlock::VectorBlock
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE VectorBlock(VectorType &vector, Index start)
Definition: VectorBlock.h:86
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
Eigen::VectorBlock::Base
Block< VectorType, internal::traits< VectorType >::Flags &RowMajorBit ? 1 :Size, internal::traits< VectorType >::Flags &RowMajorBit ? Size :1 > Base
Definition: VectorBlock.h:63
Eigen::internal::traits
Definition: ForwardDeclarations.h:17
Eigen::VectorBlock::VectorBlock
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE VectorBlock(VectorType &vector, Index start, Index size)
Definition: VectorBlock.h:75
Eigen::VectorBlock
Expression of a fixed-size or dynamic-size sub-vector.
Definition: ForwardDeclarations.h:85
internal
Definition: BandTriangularSolver.h:13
VectorType
Definition: FFTW.cpp:65
Eigen::VectorBlock::IsColVector
@ IsColVector
Definition: VectorBlock.h:65
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:09:41