OSVR-Core
VectorBlock.h
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 
47 namespace internal {
48 template<typename VectorType, int Size>
49 struct traits<VectorBlock<VectorType, Size> >
50  : public traits<Block<VectorType,
51  traits<VectorType>::Flags & RowMajorBit ? 1 : Size,
52  traits<VectorType>::Flags & RowMajorBit ? Size : 1> >
53 {
54 };
55 }
56 
57 template<typename VectorType, int Size> class VectorBlock
58  : public Block<VectorType,
59  internal::traits<VectorType>::Flags & RowMajorBit ? 1 : Size,
60  internal::traits<VectorType>::Flags & RowMajorBit ? Size : 1>
61 {
62  typedef Block<VectorType,
65  enum {
67  };
68  public:
69  EIGEN_DENSE_PUBLIC_INTERFACE(VectorBlock)
70 
71  using Base::operator=;
72 
75  inline 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  {
80  EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorBlock);
81  }
82 
85  inline VectorBlock(VectorType& vector, Index start)
86  : Base(vector, IsColVector ? start : 0, IsColVector ? 0 : start)
87  {
88  EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorBlock);
89  }
90 };
91 
92 
93 } // end namespace Eigen
94 
95 #endif // EIGEN_VECTORBLOCK_H
Definition: gtest_unittest.cc:5031
VectorBlock(VectorType &vector, Index start, Index size)
Dynamic-size constructor.
Definition: VectorBlock.h:75
iterative scaling algorithm to equilibrate rows and column norms in matrices
Definition: TestIMU_Common.h:87
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition: Constants.h:53
Definition: FFTW.cpp:65
detail::size< coerce_list< Ts... >> size
Get the size of a list (number of elements.)
Definition: Size.h:56
Expression of a fixed-size or dynamic-size sub-vector.
Definition: ForwardDeclarations.h:83
Definition: BandTriangularSolver.h:13
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:103
VectorBlock(VectorType &vector, Index start)
Fixed-size constructor.
Definition: VectorBlock.h:85
Definition: ForwardDeclarations.h:17