NestByValue.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 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_NESTBYVALUE_H
12 #define EIGEN_NESTBYVALUE_H
13 
14 namespace Eigen {
15 
16 namespace internal {
17 template<typename ExpressionType>
18 struct traits<NestByValue<ExpressionType> > : public traits<ExpressionType>
19 {
20  enum {
22  };
23 };
24 }
25 
38 template<typename ExpressionType> class NestByValue
39  : public internal::dense_xpr_base< NestByValue<ExpressionType> >::type
40 {
41  public:
42 
45 
46  EIGEN_DEVICE_FUNC explicit inline NestByValue(const ExpressionType& matrix) : m_expression(matrix) {}
47 
50 
51  EIGEN_DEVICE_FUNC operator const ExpressionType&() const { return m_expression; }
52 
53  EIGEN_DEVICE_FUNC const ExpressionType& nestedExpression() const { return m_expression; }
54 
55  protected:
56  const ExpressionType m_expression;
57 };
58 
61 template<typename Derived>
64 {
65  return NestByValue<Derived>(derived());
66 }
67 
68 namespace internal {
69 
70 // Evaluator of Solve -> eval into a temporary
71 template<typename ArgType>
72 struct evaluator<NestByValue<ArgType> >
73  : public evaluator<ArgType>
74 {
76 
78  : Base(xpr.nestedExpression())
79  {}
80 };
81 }
82 
83 } // end namespace Eigen
84 
85 #endif // EIGEN_NESTBYVALUE_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::internal::evaluator< NestByValue< ArgType > >::Base
evaluator< ArgType > Base
Definition: NestByValue.h:75
Eigen::internal::dense_xpr_base
Definition: XprHelper.h:483
Eigen::NestByValue::cols
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: NestByValue.h:49
EIGEN_CONSTEXPR
#define EIGEN_CONSTEXPR
Definition: Macros.h:787
type
Definition: pytypes.h:1525
EIGEN_DENSE_PUBLIC_INTERFACE
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
Definition: Macros.h:1283
Eigen::NestByValue::nestedExpression
const EIGEN_DEVICE_FUNC ExpressionType & nestedExpression() const
Definition: NestByValue.h:53
Eigen::NestByValue::m_expression
const ExpressionType m_expression
Definition: NestByValue.h:56
Eigen::NestByValue::Base
internal::dense_xpr_base< NestByValue >::type Base
Definition: NestByValue.h:43
Eigen::internal::evaluator< NestByValue< ArgType > >::evaluator
EIGEN_DEVICE_FUNC evaluator(const NestByValue< ArgType > &xpr)
Definition: NestByValue.h:77
Eigen::internal::evaluator
Definition: CoreEvaluators.h:90
Eigen::NestByValue::rows
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: NestByValue.h:48
matrix
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Definition: gtsam/3rdparty/Eigen/blas/common.h:110
Eigen::internal::traits
Definition: ForwardDeclarations.h:17
Eigen::NestByValue
Expression which must be nested by value.
Definition: NestByValue.h:38
EIGEN_NOEXCEPT
#define EIGEN_NOEXCEPT
Definition: Macros.h:1418
internal
Definition: BandTriangularSolver.h:13
Eigen::DenseBase::nestByValue
const EIGEN_DEVICE_FUNC NestByValue< Derived > nestByValue() const
Definition: NestByValue.h:63
Eigen::NestByRefBit
const unsigned int NestByRefBit
Definition: Constants.h:169
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:03:11