Medial Code Documentation
Loading...
Searching...
No Matches
ForwardDeclarations.h
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
14namespace Eigen {
15namespace internal {
16
17template<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> >
23template<typename T> struct traits<const T> : traits<T> {};
24
25template<typename Derived> struct has_direct_access
26{
27 enum { ret = (traits<Derived>::Flags & DirectAccessBit) ? 1 : 0 };
28};
29
30template<typename Derived> struct accessors_level
31{
33 has_write_access = (traits<Derived>::Flags & LvalueBit) ? 1 : 0,
34 value = has_direct_access ? (has_write_access ? DirectWriteAccessors : DirectAccessors)
35 : (has_write_access ? WriteAccessors : ReadOnlyAccessors)
36 };
37};
38
39template<typename T> struct evaluator_traits;
40
41template< typename T> struct evaluator;
42
43} // end namespace internal
44
45template<typename T> struct NumTraits;
46
47template<typename Derived> struct EigenBase;
48template<typename Derived> class DenseBase;
49template<typename Derived> class PlainObjectBase;
50
51
52template<typename Derived,
55
56template<typename _Scalar, int _Rows, int _Cols,
57 int _Options = AutoAlign |
58#if EIGEN_GNUC_AT(3,4)
59 // workaround a bug in at least gcc 3.4.6
60 // the innermost ?: ternary operator is misparsed. We write it slightly
61 // differently and this makes gcc 3.4.6 happy, but it's ugly.
62 // The error would only show up with EIGEN_DEFAULT_TO_ROW_MAJOR is defined
63 // (when EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION is RowMajor)
64 ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor
65 : !(_Cols==1 && _Rows!=1) ? EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION
66 : Eigen::ColMajor ),
67#else
68 ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor
69 : (_Cols==1 && _Rows!=1) ? Eigen::ColMajor
70 : EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION ),
71#endif
72 int _MaxRows = _Rows,
73 int _MaxCols = _Cols
75
76template<typename Derived> class MatrixBase;
77template<typename Derived> class ArrayBase;
78
79template<typename ExpressionType, unsigned int Added, unsigned int Removed> class Flagged;
80template<typename ExpressionType, template <typename> class StorageBase > class NoAlias;
81template<typename ExpressionType> class NestByValue;
82template<typename ExpressionType> class ForceAlignedAccess;
83template<typename ExpressionType> class SwapWrapper;
84
85template<typename XprType, int BlockRows=Dynamic, int BlockCols=Dynamic, bool InnerPanel = false> class Block;
86
87template<typename MatrixType, int Size=Dynamic> class VectorBlock;
88template<typename MatrixType> class Transpose;
89template<typename MatrixType> class Conjugate;
90template<typename NullaryOp, typename MatrixType> class CwiseNullaryOp;
91template<typename UnaryOp, typename MatrixType> class CwiseUnaryOp;
92template<typename ViewOp, typename MatrixType> class CwiseUnaryView;
93template<typename BinaryOp, typename Lhs, typename Rhs> class CwiseBinaryOp;
94template<typename Decomposition, typename Rhstype> class Solve;
95template<typename XprType> class Inverse;
96
97namespace internal {
98 template<typename Lhs, typename Rhs> struct product_tag;
99}
100
101template<typename Lhs, typename Rhs, int Option = DefaultProduct> class Product;
102
103template<typename Derived> class DiagonalBase;
104template<typename _DiagonalVectorType> class DiagonalWrapper;
105template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime=SizeAtCompileTime> class DiagonalMatrix;
106template<typename MatrixType, typename DiagonalType, int ProductOrder> class DiagonalProduct;
107template<typename MatrixType, int Index = 0> class Diagonal;
108template<int SizeAtCompileTime, int MaxSizeAtCompileTime = SizeAtCompileTime, typename IndexType=int> class PermutationMatrix;
109template<int SizeAtCompileTime, int MaxSizeAtCompileTime = SizeAtCompileTime, typename IndexType=int> class Transpositions;
110template<typename Derived> class PermutationBase;
111template<typename Derived> class TranspositionsBase;
112template<typename _IndicesType> class PermutationWrapper;
113template<typename _IndicesType> class TranspositionsWrapper;
114
115template<typename Derived,
117> class MapBase;
118template<int InnerStrideAtCompileTime, int OuterStrideAtCompileTime> class Stride;
119template<int Value = Dynamic> class InnerStride;
120template<int Value = Dynamic> class OuterStride;
121template<typename MatrixType, int MapOptions=Unaligned, typename StrideType = Stride<0,0> > class Map;
122template<typename Derived> class RefBase;
123template<typename PlainObjectType, int Options = 0,
125
126template<typename Derived> class TriangularBase;
127template<typename MatrixType, unsigned int Mode> class TriangularView;
128template<typename MatrixType, unsigned int Mode> class SelfAdjointView;
129template<typename MatrixType> class SparseView;
130template<typename ExpressionType> class WithFormat;
131template<typename MatrixType> struct CommaInitializer;
132template<typename Derived> class ReturnByValue;
133template<typename ExpressionType> class ArrayWrapper;
134template<typename ExpressionType> class MatrixWrapper;
135template<typename Derived> class SolverBase;
136template<typename XprType> class InnerIterator;
137
138namespace internal {
139template<typename DecompositionType> struct kernel_retval_base;
140template<typename DecompositionType> struct kernel_retval;
141template<typename DecompositionType> struct image_retval_base;
142template<typename DecompositionType> struct image_retval;
143} // end namespace internal
144
145namespace internal {
146template<typename _Scalar, int Rows=Dynamic, int Cols=Dynamic, int Supers=Dynamic, int Subs=Dynamic, int Options=0> class BandMatrix;
147}
148
149namespace internal {
150template<typename Lhs, typename Rhs> struct product_type;
151
152template<bool> struct EnableIf;
153
159template< typename T,
161 typename LhsShape = typename evaluator_traits<typename T::Lhs>::Shape,
162 typename RhsShape = typename evaluator_traits<typename T::Rhs>::Shape,
163 typename LhsScalar = typename traits<typename T::Lhs>::Scalar,
164 typename RhsScalar = typename traits<typename T::Rhs>::Scalar
166}
167
168template<typename Lhs, typename Rhs,
171
172// this is a workaround for sun CC
173template<typename Lhs, typename Rhs> struct LazyProductReturnType;
174
175namespace internal {
176
177// Provides scalar/packet-wise product and product with accumulation
178// with optional conjugation of the arguments.
179template<typename LhsScalar, typename RhsScalar, bool ConjLhs=false, bool ConjRhs=false> struct conj_helper;
180
181template<typename Scalar> struct scalar_sum_op;
182template<typename Scalar> struct scalar_difference_op;
183template<typename LhsScalar,typename RhsScalar> struct scalar_conj_product_op;
184template<typename Scalar> struct scalar_opposite_op;
185template<typename Scalar> struct scalar_conjugate_op;
186template<typename Scalar> struct scalar_real_op;
187template<typename Scalar> struct scalar_imag_op;
188template<typename Scalar> struct scalar_abs_op;
189template<typename Scalar> struct scalar_abs2_op;
190template<typename Scalar> struct scalar_sqrt_op;
191template<typename Scalar> struct scalar_rsqrt_op;
192template<typename Scalar> struct scalar_exp_op;
193template<typename Scalar> struct scalar_log_op;
194template<typename Scalar> struct scalar_cos_op;
195template<typename Scalar> struct scalar_sin_op;
196template<typename Scalar> struct scalar_acos_op;
197template<typename Scalar> struct scalar_asin_op;
198template<typename Scalar> struct scalar_tan_op;
199template<typename Scalar> struct scalar_pow_op;
200template<typename Scalar> struct scalar_inverse_op;
201template<typename Scalar> struct scalar_square_op;
202template<typename Scalar> struct scalar_cube_op;
203template<typename Scalar, typename NewType> struct scalar_cast_op;
204template<typename Scalar> struct scalar_multiple_op;
205template<typename Scalar> struct scalar_quotient1_op;
206template<typename Scalar> struct scalar_min_op;
207template<typename Scalar> struct scalar_max_op;
208template<typename Scalar> struct scalar_random_op;
209template<typename Scalar> struct scalar_add_op;
210template<typename Scalar> struct scalar_constant_op;
211template<typename Scalar> struct scalar_identity_op;
212template<typename Scalar,bool iscpx> struct scalar_sign_op;
213
214template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_product_op;
215template<typename LhsScalar,typename RhsScalar> struct scalar_multiple2_op;
216template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_quotient_op;
217template<typename LhsScalar,typename RhsScalar> struct scalar_quotient2_op;
218
219} // end namespace internal
220
221struct IOFormat;
222
223// Array module
224template<typename _Scalar, int _Rows, int _Cols,
225 int _Options = AutoAlign |
226#if EIGEN_GNUC_AT(3,4)
227 // workaround a bug in at least gcc 3.4.6
228 // the innermost ?: ternary operator is misparsed. We write it slightly
229 // differently and this makes gcc 3.4.6 happy, but it's ugly.
230 // The error would only show up with EIGEN_DEFAULT_TO_ROW_MAJOR is defined
231 // (when EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION is RowMajor)
232 ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor
233 : !(_Cols==1 && _Rows!=1) ? EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION
234 : Eigen::ColMajor ),
235#else
236 ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor
237 : (_Cols==1 && _Rows!=1) ? Eigen::ColMajor
238 : EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION ),
239#endif
240 int _MaxRows = _Rows, int _MaxCols = _Cols> class Array;
241template<typename ConditionMatrixType, typename ThenMatrixType, typename ElseMatrixType> class Select;
242template<typename MatrixType, typename BinaryOp, int Direction> class PartialReduxExpr;
243template<typename ExpressionType, int Direction> class VectorwiseOp;
244template<typename MatrixType,int RowFactor,int ColFactor> class Replicate;
245template<typename MatrixType, int Direction = BothDirections> class Reverse;
246
247template<typename MatrixType> class FullPivLU;
248template<typename MatrixType> class PartialPivLU;
249namespace internal {
250template<typename MatrixType> struct inverse_impl;
251}
252template<typename MatrixType> class HouseholderQR;
253template<typename MatrixType> class ColPivHouseholderQR;
254template<typename MatrixType> class FullPivHouseholderQR;
255template<typename MatrixType, int QRPreconditioner = ColPivHouseholderQRPreconditioner> class JacobiSVD;
256template<typename MatrixType> class BDCSVD;
257template<typename MatrixType, int UpLo = Lower> class LLT;
258template<typename MatrixType, int UpLo = Lower> class LDLT;
259template<typename VectorsType, typename CoeffsType, int Side=OnTheLeft> class HouseholderSequence;
260template<typename Scalar> class JacobiRotation;
261
262// Geometry module:
263template<typename Derived, int _Dim> class RotationBase;
264template<typename Lhs, typename Rhs> class Cross;
265template<typename Derived> class QuaternionBase;
266template<typename Scalar> class Rotation2D;
267template<typename Scalar> class AngleAxis;
268template<typename Scalar,int Dim> class Translation;
269template<typename Scalar,int Dim> class AlignedBox;
270template<typename Scalar, int Options = AutoAlign> class Quaternion;
271template<typename Scalar,int Dim,int Mode,int _Options=AutoAlign> class Transform;
272template <typename _Scalar, int _AmbientDim, int Options=AutoAlign> class ParametrizedLine;
273template <typename _Scalar, int _AmbientDim, int Options=AutoAlign> class Hyperplane;
274template<typename Scalar> class UniformScaling;
275template<typename MatrixType,int Direction> class Homogeneous;
276
277// Sparse module:
278template<typename Derived> class SparseMatrixBase;
279
280// MatrixFunctions module
281template<typename Derived> struct MatrixExponentialReturnValue;
282template<typename Derived> class MatrixFunctionReturnValue;
283template<typename Derived> class MatrixSquareRootReturnValue;
284template<typename Derived> class MatrixLogarithmReturnValue;
285template<typename Derived> class MatrixPowerReturnValue;
286template<typename Derived> class MatrixComplexPowerReturnValue;
287
288namespace internal {
289template <typename Scalar>
291{
292 typedef std::complex<typename NumTraits<Scalar>::Real> ComplexScalar;
293 typedef ComplexScalar type(ComplexScalar, int);
294};
295}
296
297} // end namespace Eigen
298
299#endif // EIGEN_FORWARDDECLARATIONS_H
\geometry_module
Definition AlignedBox.h:31
\geometry_module
Definition AngleAxis.h:50
Base class for all 1D and 2D array, and related expressions.
Definition ArrayBase.h:41
Expression of a mathematical vector or matrix as an array object.
Definition ArrayWrapper.h:42
General-purpose arrays with easy API for coefficient-wise operations.
Definition Array.h:47
class Bidiagonal Divide and Conquer SVD
Definition BDCSVD.h:56
Expression of a fixed-size or dynamic-size block.
Definition Block.h:106
Householder rank-revealing QR decomposition of a matrix with column-pivoting.
Definition ColPivHouseholderQR.h:47
Definition ForwardDeclarations.h:89
Definition ForwardDeclarations.h:264
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition CwiseBinaryOp.h:85
Generic expression of a matrix where all coefficients are defined by a functor.
Definition CwiseNullaryOp.h:45
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition CwiseUnaryOp.h:57
Generic lvalue expression of a coefficient-wise unary operator of a matrix or a vector.
Definition CwiseUnaryView.h:60
Base class for all dense matrices, vectors, and arrays.
Definition DenseBase.h:49
Definition ForwardDeclarations.h:54
Definition DiagonalMatrix.h:19
Represents a diagonal matrix with its storage.
Definition DiagonalMatrix.h:119
Definition ForwardDeclarations.h:106
Expression of a diagonal matrix.
Definition DiagonalMatrix.h:248
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
Definition Diagonal.h:65
Definition ForwardDeclarations.h:79
Enforce aligned packet loads and stores regardless of what is requested.
Definition ForceAlignedAccess.h:36
Householder rank-revealing QR decomposition of a matrix with full pivoting.
Definition FullPivHouseholderQR.h:56
LU decomposition of a matrix with complete pivoting, and related features.
Definition FullPivLU.h:59
\geometry_module
Definition Homogeneous.h:62
Householder QR decomposition of a matrix.
Definition HouseholderQR.h:43
\householder_module
Definition HouseholderSequence.h:121
\geometry_module
Definition Hyperplane.h:35
An InnerIterator allows to loop over the element of any matrix expression.
Definition CoreIterators.h:34
Convenience specialization of Stride to specify only an inner stride See class Map for some examples.
Definition Stride.h:91
Expression of the inverse of another expression.
Definition Inverse.h:44
\jacobi_module
Definition Jacobi.h:35
Two-sided Jacobi SVD decomposition of a rectangular matrix.
Definition JacobiSVD.h:500
Robust Cholesky decomposition of a matrix with pivoting.
Definition LDLT.h:49
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
Definition LLT.h:51
Base class for Map and Block expression with direct access.
Definition ForwardDeclarations.h:117
A matrix or vector expression mapping an existing array of data.
Definition Map.h:91
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
Definition ForwardDeclarations.h:286
Definition ForwardDeclarations.h:282
Definition ForwardDeclarations.h:284
Definition ForwardDeclarations.h:285
Definition ForwardDeclarations.h:283
Expression of an array as a mathematical vector or matrix.
Definition ArrayWrapper.h:185
The matrix class, also used for vectors and row-vectors.
Definition Matrix.h:180
Expression which must be nested by value.
Definition NestByValue.h:37
Pseudo expression providing an operator = assuming no aliasing.
Definition NoAlias.h:32
Convenience specialization of Stride to specify only an outer stride See class Map for some examples.
Definition Stride.h:102
\geometry_module
Definition ParametrizedLine.h:31
LU decomposition of a matrix with partial pivoting, and related features.
Definition PartialPivLU.h:64
Generic expression of a partially reduxed matrix.
Definition VectorwiseOp.h:58
Base class for permutations.
Definition PermutationMatrix.h:48
Permutation matrix.
Definition PermutationMatrix.h:311
Class to view a vector of integers as a permutation matrix.
Definition PermutationMatrix.h:518
Dense storage base class for matrices and arrays.
Definition PlainObjectBase.h:93
Expression of the product of two arbitrary matrices or vectors.
Definition Product.h:111
\geometry_module
Definition Quaternion.h:36
\geometry_module
Definition Quaternion.h:228
Definition Ref.h:124
A matrix or vector expression mapping an existing expression.
Definition Ref.h:188
Expression of the multiple replication of a matrix or vector.
Definition Replicate.h:62
Definition ReturnByValue.h:53
Expression of the reverse of a vector or matrix.
Definition Reverse.h:65
\geometry_module
Definition Rotation2D.h:42
Common base class for compact rotation representations.
Definition RotationBase.h:30
Expression of a coefficient wise version of the C++ ternary operator ?:
Definition Select.h:54
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Definition SelfAdjointView.h:51
Pseudo expression representing a solving operation.
Definition Solve.h:63
A base class for matrix decomposition and solvers.
Definition SolverBase.h:42
Base class of any sparse matrices or sparse expressions.
Definition SparseMatrixBase.h:34
Definition SparseView.h:32
Holds strides information for Map.
Definition Stride.h:45
Definition ForwardDeclarations.h:83
\geometry_module
Definition Transform.h:201
\geometry_module
Definition Translation.h:31
Expression of the transpose of a matrix.
Definition Transpose.h:55
Definition Transpositions.h:46
Definition Transpositions.h:290
Represents a sequence of transpositions (row/column interchange)
Definition Transpositions.h:159
Base class for triangular part in a matrix.
Definition TriangularMatrix.h:28
Expression of a triangular part in a matrix.
Definition TriangularMatrix.h:188
Definition Scaling.h:34
Expression of a fixed-size or dynamic-size sub-vector.
Definition VectorBlock.h:61
Pseudo expression providing partial reduction operations.
Definition VectorwiseOp.h:157
Pseudo expression providing matrix output with given format.
Definition IO.h:95
Represents a rectangular matrix with a banded storage.
Definition BandMatrix.h:200
@ ColMajor
Storage order is column major (see TopicStorageOrders).
Definition Constants.h:320
@ RowMajor
Storage order is row major (see TopicStorageOrders).
Definition Constants.h:322
@ AutoAlign
Align the matrix itself if it is vectorizable fixed-size.
Definition Constants.h:324
@ DirectAccessors
Direct read-only access to the coefficients.
Definition Constants.h:370
@ ReadOnlyAccessors
Read-only access via a member function.
Definition Constants.h:366
@ WriteAccessors
Read/write access via member functions.
Definition Constants.h:368
@ DirectWriteAccessors
Direct read/write access to the coefficients.
Definition Constants.h:372
const unsigned int DirectAccessBit
Means that the underlying array of coefficients can be directly accessed as a plain strided array.
Definition Constants.h:149
const unsigned int LvalueBit
Means the expression has a coeffRef() method, i.e.
Definition Constants.h:138
Helper class used by the comma initializer operator.
Definition CommaInitializer.h:29
Common base class for all classes T such that MatrixBase has an operator=(T) and a constructor Matrix...
Definition EigenBase.h:29
Stores a set of parameters controlling the way matrices are printed.
Definition IO.h:51
Definition ForwardDeclarations.h:173
Definition ForwardDeclarations.h:281
Holds information about the various numeric (i.e.
Definition NumTraits.h:108
Definition ForwardDeclarations.h:170
Definition ForwardDeclarations.h:152
Definition ForwardDeclarations.h:31
Definition Meta.h:34
Definition ForwardDeclarations.h:179
Definition CoreEvaluators.h:75
Definition CoreEvaluators.h:82
Definition ForwardDeclarations.h:26
Definition ForwardDeclarations.h:142
Definition ForwardDeclarations.h:250
Definition ForwardDeclarations.h:140
Definition ForwardDeclarations.h:165
Definition ForwardDeclarations.h:98
Definition GeneralProduct.h:36
Definition UnaryFunctors.h:91
Definition UnaryFunctors.h:41
Definition UnaryFunctors.h:372
Definition BinaryFunctors.h:438
Definition UnaryFunctors.h:391
Definition UnaryFunctors.h:152
Definition BinaryFunctors.h:87
Definition UnaryFunctors.h:109
Definition NullaryFunctors.h:18
Definition UnaryFunctors.h:314
Definition UnaryFunctors.h:591
Definition BinaryFunctors.h:266
Definition UnaryFunctors.h:231
Definition NullaryFunctors.h:31
Definition UnaryFunctors.h:183
Definition UnaryFunctors.h:559
Definition UnaryFunctors.h:247
Definition BinaryFunctors.h:139
Definition BinaryFunctors.h:116
Definition BinaryFunctors.h:376
Definition BinaryFunctors.h:358
Definition UnaryFunctors.h:22
Definition BinaryFunctors.h:493
Definition BinaryFunctors.h:59
Definition BinaryFunctors.h:396
Definition BinaryFunctors.h:411
Definition BinaryFunctors.h:286
Definition Random.h:17
Definition UnaryFunctors.h:167
Definition UnaryFunctors.h:295
Definition UnaryFunctors.h:734
Definition UnaryFunctors.h:333
Definition UnaryFunctors.h:277
Definition UnaryFunctors.h:575
Definition BinaryFunctors.h:24
Definition UnaryFunctors.h:353
Definition ForwardDeclarations.h:291
Definition ForwardDeclarations.h:17