ForwardDeclarations.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) 2007-2010 Benoit Jacob <jacob.benoit.1@gmail.com>
5 // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
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_FORWARDDECLARATIONS_H
12 #define EIGEN_FORWARDDECLARATIONS_H
13 
14 namespace Eigen {
15 namespace internal {
16 
17 template<typename T> struct traits;
18 
19 // here we say once and for all that traits<const T> == traits<T>
20 // When constness must affect traits, it has to be constness on template parameters on which T itself depends.
21 // For example, traits<Map<const T> > != traits<Map<T> >, but
22 // traits<const Map<T> > == traits<Map<T> >
23 template<typename T> struct traits<const T> : traits<T> {};
24 
25 template<typename Derived> struct has_direct_access
26 {
27  enum { ret = (traits<Derived>::Flags & DirectAccessBit) ? 1 : 0 };
28 };
29 
30 template<typename Derived> struct accessors_level
31 {
33  has_write_access = (traits<Derived>::Flags & LvalueBit) ? 1 : 0,
35  : (has_write_access ? WriteAccessors : ReadOnlyAccessors)
36  };
37 };
38 
39 template<typename T> struct evaluator_traits;
40 
41 template< typename T> struct evaluator;
42 
43 } // end namespace internal
44 
45 template<typename T> struct NumTraits;
46 
47 template<typename Derived> struct EigenBase;
48 template<typename Derived> class DenseBase;
49 template<typename Derived> class PlainObjectBase;
50 template<typename Derived, int Level> class DenseCoeffsBase;
51 
52 template<typename _Scalar, int _Rows, int _Cols,
53  int _Options = AutoAlign |
54 #if EIGEN_GNUC_AT(3,4)
55  // workaround a bug in at least gcc 3.4.6
56  // the innermost ?: ternary operator is misparsed. We write it slightly
57  // differently and this makes gcc 3.4.6 happy, but it's ugly.
58  // The error would only show up with EIGEN_DEFAULT_TO_ROW_MAJOR is defined
59  // (when EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION is RowMajor)
60  ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor
61  : !(_Cols==1 && _Rows!=1) ? EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION
62  : Eigen::ColMajor ),
63 #else
64  ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor
65  : (_Cols==1 && _Rows!=1) ? Eigen::ColMajor
67 #endif
68  int _MaxRows = _Rows,
69  int _MaxCols = _Cols
70 > class Matrix;
71 
72 template<typename Derived> class MatrixBase;
73 template<typename Derived> class ArrayBase;
74 
75 template<typename ExpressionType, unsigned int Added, unsigned int Removed> class Flagged;
76 template<typename ExpressionType, template <typename> class StorageBase > class NoAlias;
77 template<typename ExpressionType> class NestByValue;
78 template<typename ExpressionType> class ForceAlignedAccess;
79 template<typename ExpressionType> class SwapWrapper;
80 
81 template<typename XprType, int BlockRows=Dynamic, int BlockCols=Dynamic, bool InnerPanel = false> class Block;
82 template<typename XprType, typename RowIndices, typename ColIndices> class IndexedView;
83 template<typename XprType, int Rows=Dynamic, int Cols=Dynamic, int Order=0> class Reshaped;
84 
85 template<typename MatrixType, int Size=Dynamic> class VectorBlock;
86 template<typename MatrixType> class Transpose;
87 template<typename MatrixType> class Conjugate;
88 template<typename NullaryOp, typename MatrixType> class CwiseNullaryOp;
89 template<typename UnaryOp, typename MatrixType> class CwiseUnaryOp;
90 template<typename ViewOp, typename MatrixType> class CwiseUnaryView;
91 template<typename BinaryOp, typename Lhs, typename Rhs> class CwiseBinaryOp;
92 template<typename TernaryOp, typename Arg1, typename Arg2, typename Arg3> class CwiseTernaryOp;
93 template<typename Decomposition, typename Rhstype> class Solve;
94 template<typename XprType> class Inverse;
95 
96 template<typename Lhs, typename Rhs, int Option = DefaultProduct> class Product;
97 
98 template<typename Derived> class DiagonalBase;
99 template<typename _DiagonalVectorType> class DiagonalWrapper;
100 template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime=SizeAtCompileTime> class DiagonalMatrix;
101 template<typename MatrixType, typename DiagonalType, int ProductOrder> class DiagonalProduct;
102 template<typename MatrixType, int Index = 0> class Diagonal;
103 template<int SizeAtCompileTime, int MaxSizeAtCompileTime = SizeAtCompileTime, typename IndexType=int> class PermutationMatrix;
104 template<int SizeAtCompileTime, int MaxSizeAtCompileTime = SizeAtCompileTime, typename IndexType=int> class Transpositions;
105 template<typename Derived> class PermutationBase;
106 template<typename Derived> class TranspositionsBase;
107 template<typename _IndicesType> class PermutationWrapper;
108 template<typename _IndicesType> class TranspositionsWrapper;
109 
110 template<typename Derived,
112 > class MapBase;
113 template<int OuterStrideAtCompileTime, int InnerStrideAtCompileTime> class Stride;
114 template<int Value = Dynamic> class InnerStride;
115 template<int Value = Dynamic> class OuterStride;
116 template<typename MatrixType, int MapOptions=Unaligned, typename StrideType = Stride<0,0> > class Map;
117 template<typename Derived> class RefBase;
118 template<typename PlainObjectType, int Options = 0,
120 
121 template<typename Derived> class TriangularBase;
122 template<typename MatrixType, unsigned int Mode> class TriangularView;
123 template<typename MatrixType, unsigned int Mode> class SelfAdjointView;
124 template<typename MatrixType> class SparseView;
125 template<typename ExpressionType> class WithFormat;
126 template<typename MatrixType> struct CommaInitializer;
127 template<typename Derived> class ReturnByValue;
128 template<typename ExpressionType> class ArrayWrapper;
129 template<typename ExpressionType> class MatrixWrapper;
130 template<typename Derived> class SolverBase;
131 template<typename XprType> class InnerIterator;
132 
133 namespace internal {
134 template<typename XprType> class generic_randaccess_stl_iterator;
135 template<typename XprType> class pointer_based_stl_iterator;
136 template<typename XprType, DirectionType Direction> class subvector_stl_iterator;
137 template<typename XprType, DirectionType Direction> class subvector_stl_reverse_iterator;
138 template<typename DecompositionType> struct kernel_retval_base;
139 template<typename DecompositionType> struct kernel_retval;
140 template<typename DecompositionType> struct image_retval_base;
141 template<typename DecompositionType> struct image_retval;
142 } // end namespace internal
143 
144 namespace internal {
145 template<typename _Scalar, int Rows=Dynamic, int Cols=Dynamic, int Supers=Dynamic, int Subs=Dynamic, int Options=0> class BandMatrix;
146 }
147 
148 namespace internal {
149 template<typename Lhs, typename Rhs> struct product_type;
150 
151 template<bool> struct EnableIf;
152 
158 template< typename T,
160  typename LhsShape = typename evaluator_traits<typename T::Lhs>::Shape,
161  typename RhsShape = typename evaluator_traits<typename T::Rhs>::Shape,
162  typename LhsScalar = typename traits<typename T::Lhs>::Scalar,
163  typename RhsScalar = typename traits<typename T::Rhs>::Scalar
165 }
166 
167 template<typename Lhs, typename Rhs,
168  int ProductType = internal::product_type<Lhs,Rhs>::value>
170 
171 // this is a workaround for sun CC
172 template<typename Lhs, typename Rhs> struct LazyProductReturnType;
173 
174 namespace internal {
175 
176 // Provides scalar/packet-wise product and product with accumulation
177 // with optional conjugation of the arguments.
178 template<typename LhsScalar, typename RhsScalar, bool ConjLhs=false, bool ConjRhs=false> struct conj_helper;
179 
180 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_sum_op;
181 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_difference_op;
182 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_conj_product_op;
183 template<typename LhsScalar,typename RhsScalar=LhsScalar, int NaNPropagation=PropagateFast> struct scalar_min_op;
184 template<typename LhsScalar,typename RhsScalar=LhsScalar, int NaNPropagation=PropagateFast> struct scalar_max_op;
185 template<typename Scalar> struct scalar_opposite_op;
186 template<typename Scalar> struct scalar_conjugate_op;
187 template<typename Scalar> struct scalar_real_op;
188 template<typename Scalar> struct scalar_imag_op;
189 template<typename Scalar> struct scalar_abs_op;
190 template<typename Scalar> struct scalar_abs2_op;
191 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_absolute_difference_op;
192 template<typename Scalar> struct scalar_sqrt_op;
193 template<typename Scalar> struct scalar_rsqrt_op;
194 template<typename Scalar> struct scalar_exp_op;
195 template<typename Scalar> struct scalar_log_op;
196 template<typename Scalar> struct scalar_cos_op;
197 template<typename Scalar> struct scalar_sin_op;
198 template<typename Scalar> struct scalar_acos_op;
199 template<typename Scalar> struct scalar_asin_op;
200 template<typename Scalar> struct scalar_tan_op;
201 template<typename Scalar> struct scalar_inverse_op;
202 template<typename Scalar> struct scalar_square_op;
203 template<typename Scalar> struct scalar_cube_op;
204 template<typename Scalar, typename NewType> struct scalar_cast_op;
205 template<typename Scalar> struct scalar_random_op;
206 template<typename Scalar> struct scalar_constant_op;
207 template<typename Scalar> struct scalar_identity_op;
208 template<typename Scalar,bool is_complex, bool is_integer> struct scalar_sign_op;
209 template<typename Scalar,typename ScalarExponent> struct scalar_pow_op;
210 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_hypot_op;
211 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_product_op;
212 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_quotient_op;
213 
214 // SpecialFunctions module
215 template<typename Scalar> struct scalar_lgamma_op;
216 template<typename Scalar> struct scalar_digamma_op;
217 template<typename Scalar> struct scalar_erf_op;
218 template<typename Scalar> struct scalar_erfc_op;
219 template<typename Scalar> struct scalar_ndtri_op;
220 template<typename Scalar> struct scalar_igamma_op;
221 template<typename Scalar> struct scalar_igammac_op;
222 template<typename Scalar> struct scalar_zeta_op;
223 template<typename Scalar> struct scalar_betainc_op;
224 
225 // Bessel functions in SpecialFunctions module
226 template<typename Scalar> struct scalar_bessel_i0_op;
227 template<typename Scalar> struct scalar_bessel_i0e_op;
228 template<typename Scalar> struct scalar_bessel_i1_op;
229 template<typename Scalar> struct scalar_bessel_i1e_op;
230 template<typename Scalar> struct scalar_bessel_j0_op;
231 template<typename Scalar> struct scalar_bessel_y0_op;
232 template<typename Scalar> struct scalar_bessel_j1_op;
233 template<typename Scalar> struct scalar_bessel_y1_op;
234 template<typename Scalar> struct scalar_bessel_k0_op;
235 template<typename Scalar> struct scalar_bessel_k0e_op;
236 template<typename Scalar> struct scalar_bessel_k1_op;
237 template<typename Scalar> struct scalar_bessel_k1e_op;
238 
239 
240 } // end namespace internal
241 
242 struct IOFormat;
243 
244 // Array module
245 template<typename _Scalar, int _Rows, int _Cols,
246  int _Options = AutoAlign |
247 #if EIGEN_GNUC_AT(3,4)
248  // workaround a bug in at least gcc 3.4.6
249  // the innermost ?: ternary operator is misparsed. We write it slightly
250  // differently and this makes gcc 3.4.6 happy, but it's ugly.
251  // The error would only show up with EIGEN_DEFAULT_TO_ROW_MAJOR is defined
252  // (when EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION is RowMajor)
253  ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor
254  : !(_Cols==1 && _Rows!=1) ? EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION
255  : Eigen::ColMajor ),
256 #else
257  ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor
258  : (_Cols==1 && _Rows!=1) ? Eigen::ColMajor
259  : EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION ),
260 #endif
261  int _MaxRows = _Rows, int _MaxCols = _Cols> class Array;
262 template<typename ConditionMatrixType, typename ThenMatrixType, typename ElseMatrixType> class Select;
263 template<typename MatrixType, typename BinaryOp, int Direction> class PartialReduxExpr;
264 template<typename ExpressionType, int Direction> class VectorwiseOp;
265 template<typename MatrixType,int RowFactor,int ColFactor> class Replicate;
266 template<typename MatrixType, int Direction = BothDirections> class Reverse;
267 
268 template<typename MatrixType> class FullPivLU;
269 template<typename MatrixType> class PartialPivLU;
270 namespace internal {
271 template<typename MatrixType> struct inverse_impl;
272 }
273 template<typename MatrixType> class HouseholderQR;
274 template<typename MatrixType> class ColPivHouseholderQR;
275 template<typename MatrixType> class FullPivHouseholderQR;
276 template<typename MatrixType> class CompleteOrthogonalDecomposition;
277 template<typename MatrixType> class SVDBase;
278 template<typename MatrixType, int QRPreconditioner = ColPivHouseholderQRPreconditioner> class JacobiSVD;
279 template<typename MatrixType> class BDCSVD;
280 template<typename MatrixType, int UpLo = Lower> class LLT;
281 template<typename MatrixType, int UpLo = Lower> class LDLT;
282 template<typename VectorsType, typename CoeffsType, int Side=OnTheLeft> class HouseholderSequence;
283 template<typename Scalar> class JacobiRotation;
284 
285 // Geometry module:
286 template<typename Derived, int _Dim> class RotationBase;
287 template<typename Lhs, typename Rhs> class Cross;
288 template<typename Derived> class QuaternionBase;
289 template<typename Scalar> class Rotation2D;
290 template<typename Scalar> class AngleAxis;
291 template<typename Scalar,int Dim> class Translation;
292 template<typename Scalar,int Dim> class AlignedBox;
293 template<typename Scalar, int Options = AutoAlign> class Quaternion;
294 template<typename Scalar,int Dim,int Mode,int _Options=AutoAlign> class Transform;
295 template <typename _Scalar, int _AmbientDim, int Options=AutoAlign> class ParametrizedLine;
296 template <typename _Scalar, int _AmbientDim, int Options=AutoAlign> class Hyperplane;
297 template<typename Scalar> class UniformScaling;
298 template<typename MatrixType,int Direction> class Homogeneous;
299 
300 // Sparse module:
301 template<typename Derived> class SparseMatrixBase;
302 
303 // MatrixFunctions module
304 template<typename Derived> struct MatrixExponentialReturnValue;
305 template<typename Derived> class MatrixFunctionReturnValue;
306 template<typename Derived> class MatrixSquareRootReturnValue;
307 template<typename Derived> class MatrixLogarithmReturnValue;
308 template<typename Derived> class MatrixPowerReturnValue;
309 template<typename Derived> class MatrixComplexPowerReturnValue;
310 
311 namespace internal {
312 template <typename Scalar>
314 {
316  typedef ComplexScalar type(ComplexScalar, int);
317 };
318 }
319 
320 } // end namespace Eigen
321 
322 #endif // EIGEN_FORWARDDECLARATIONS_H
Generic expression of a matrix where all coefficients are defined by a functor.
Robust Cholesky decomposition of a matrix with pivoting.
Definition: LDLT.h:59
std::complex< typename NumTraits< Scalar >::Real > ComplexScalar
Enforce aligned packet loads and stores regardless of what is requested.
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:71
Expression of a mathematical vector or matrix as an array object.
Definition: ArrayWrapper.h:42
Householder rank-revealing QR decomposition of a matrix with full pivoting.
Pseudo expression providing an operator = assuming no aliasing.
Definition: NoAlias.h:31
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:94
Proxy for the matrix square root of some matrix (expression).
Base class for triangular part in a matrix.
Expression of the transpose of a matrix.
Definition: Transpose.h:52
const unsigned int DirectAccessBit
Definition: Constants.h:155
const unsigned int LvalueBit
Definition: Constants.h:144
Represents a rectangular matrix with a banded storage.
Definition: BandMatrix.h:199
Represents a diagonal matrix with its storage.
LU decomposition of a matrix with partial pivoting, and related features.
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Holds strides information for Map.
Definition: Stride.h:48
Rotation given by a cosine-sine pair.
Generic expression of a partially reduxed matrix.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Definition: NumTraits.h:232
Pseudo expression providing broadcasting and partial reduction operations.
Complete orthogonal decomposition (COD) of a matrix.
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:41
Proxy for the matrix function of some matrix (expression).
Proxy for the matrix power of some matrix (expression).
An axis aligned box.
Base class for permutations.
Helper class used by the comma initializer operator.
Sequence of Householder reflections acting on subspaces with decreasing size.
Represents a translation transformation.
Expression of the inverse of another expression.
Definition: Inverse.h:43
Permutation matrix.
Generic lvalue expression of a coefficient-wise unary operator of a matrix or a vector.
Expression of an array as a mathematical vector or matrix.
Definition: ArrayBase.h:15
Expression of a fixed-size or dynamic-size sub-vector.
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition: CwiseBinaryOp.h:77
Base class of any sparse matrices or sparse expressions.
Base class of SVD algorithms.
Householder rank-revealing QR decomposition of a matrix with column-pivoting.
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
Definition: LLT.h:66
Convenience specialization of Stride to specify only an inner stride See class Map for some examples...
Definition: Stride.h:95
Eigen::Triplet< double > T
Generic expression where a coefficient-wise ternary operator is applied to two expressions.
Expression of the multiple replication of a matrix or vector.
Definition: Replicate.h:61
Represents a generic uniform scaling transformation.
Common base class for compact rotation representations.
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Expression of a dense or sparse matrix with zero or too small values removed.
Base class for all 1D and 2D array, and related expressions.
Definition: ArrayBase.h:39
Class to view a vector of integers as a permutation matrix.
Base class for quaternion expressions.
Expression which must be nested by value.
Definition: NestByValue.h:38
class Bidiagonal Divide and Conquer SVD
DenseIndex ret
A matrix or vector expression mapping an existing expression.
Definition: Ref.h:281
mp::number< mp::cpp_dec_float< 100 >, mp::et_on > Real
ComplexScalar type(ComplexScalar, int)
Represents a rotation/orientation in a 2 dimensional space.
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:103
The quaternion class used to represent 3D orientations and rotations.
LU decomposition of a matrix with complete pivoting, and related features.
storage_kind_to_shape< typename traits< T >::StorageKind >::Shape Shape
Householder QR decomposition of a matrix.
General-purpose arrays with easy API for coefficient-wise operations.
Definition: Array.h:45
Two-sided Jacobi SVD decomposition of a rectangular matrix.
Expression of a triangular part in a matrix.
Expression of a diagonal matrix.
Expression of a non-sequential sub-matrix defined by arbitrary sequences of row and column indices...
Definition: IndexedView.h:109
Proxy for the matrix exponential of some matrix (expression).
Expression of a fixed-size or dynamic-size reshape.
Definition: Reshaped.h:96
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
Definition: Diagonal.h:63
Pseudo expression representing a solving operation.
Definition: Solve.h:62
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition: CwiseUnaryOp.h:55
The matrix class, also used for vectors and row-vectors.
Pseudo expression providing matrix output with given format.
Definition: IO.h:96
Convenience specialization of Stride to specify only an outer stride See class Map for some examples...
Definition: Stride.h:106
Expression of the reverse of a vector or matrix.
Definition: Reverse.h:63
A base class for matrix decomposition and solvers.
Definition: SolverBase.h:68
Proxy for the matrix power of some matrix (expression).
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
A parametrized line.
Stores a set of parameters controlling the way matrices are printed.
Definition: IO.h:51
Represents a 3D rotation as a rotation angle around an arbitrary 3D axis.
Represents a sequence of transpositions (row/column interchange)
Represents an homogeneous transformation in a N dimensional space.
Proxy for the matrix logarithm of some matrix (expression).
Definition: pytypes.h:1370
#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION
Definition: Macros.h:29
Expression of one (or a set of) homogeneous vector(s)
Expression of a coefficient wise version of the C++ ternary operator ?:
Definition: Select.h:52
An InnerIterator allows to loop over the element of any matrix expression.
Definition: CoreIterators.h:33


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:14