![]() |
Eigen
3.3.3
|
00001 // This file is part of Eigen, a lightweight C++ template library 00002 // for linear algebra. 00003 // 00004 // Copyright (C) 2007-2010 Benoit Jacob <jacob.benoit.1@gmail.com> 00005 // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr> 00006 // 00007 // This Source Code Form is subject to the terms of the Mozilla 00008 // Public License v. 2.0. If a copy of the MPL was not distributed 00009 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 00010 00011 #ifndef EIGEN_FORWARDDECLARATIONS_H 00012 #define EIGEN_FORWARDDECLARATIONS_H 00013 00014 namespace Eigen { 00015 namespace internal { 00016 00017 template<typename T> struct traits; 00018 00019 // here we say once and for all that traits<const T> == traits<T> 00020 // When constness must affect traits, it has to be constness on template parameters on which T itself depends. 00021 // For example, traits<Map<const T> > != traits<Map<T> >, but 00022 // traits<const Map<T> > == traits<Map<T> > 00023 template<typename T> struct traits<const T> : traits<T> {}; 00024 00025 template<typename Derived> struct has_direct_access 00026 { 00027 enum { ret = (traits<Derived>::Flags & DirectAccessBit) ? 1 : 0 }; 00028 }; 00029 00030 template<typename Derived> struct accessors_level 00031 { 00032 enum { has_direct_access = (traits<Derived>::Flags & DirectAccessBit) ? 1 : 0, 00033 has_write_access = (traits<Derived>::Flags & LvalueBit) ? 1 : 0, 00034 value = has_direct_access ? (has_write_access ? DirectWriteAccessors : DirectAccessors) 00035 : (has_write_access ? WriteAccessors : ReadOnlyAccessors) 00036 }; 00037 }; 00038 00039 template<typename T> struct evaluator_traits; 00040 00041 template< typename T> struct evaluator; 00042 00043 } // end namespace internal 00044 00045 template<typename T> struct NumTraits; 00046 00047 template<typename Derived> struct EigenBase; 00048 template<typename Derived> class DenseBase; 00049 template<typename Derived> class PlainObjectBase; 00050 00051 00052 template<typename Derived, 00053 int Level = internal::accessors_level<Derived>::value > 00054 class DenseCoeffsBase; 00055 00056 template<typename _Scalar, int _Rows, int _Cols, 00057 int _Options = AutoAlign | 00058 #if EIGEN_GNUC_AT(3,4) 00059 // workaround a bug in at least gcc 3.4.6 00060 // the innermost ?: ternary operator is misparsed. We write it slightly 00061 // differently and this makes gcc 3.4.6 happy, but it's ugly. 00062 // The error would only show up with EIGEN_DEFAULT_TO_ROW_MAJOR is defined 00063 // (when EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION is RowMajor) 00064 ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor 00065 : !(_Cols==1 && _Rows!=1) ? EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION 00066 : Eigen::ColMajor ), 00067 #else 00068 ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor 00069 : (_Cols==1 && _Rows!=1) ? Eigen::ColMajor 00070 : EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION ), 00071 #endif 00072 int _MaxRows = _Rows, 00073 int _MaxCols = _Cols 00074 > class Matrix; 00075 00076 template<typename Derived> class MatrixBase; 00077 template<typename Derived> class ArrayBase; 00078 00079 template<typename ExpressionType, unsigned int Added, unsigned int Removed> class Flagged; 00080 template<typename ExpressionType, template <typename> class StorageBase > class NoAlias; 00081 template<typename ExpressionType> class NestByValue; 00082 template<typename ExpressionType> class ForceAlignedAccess; 00083 template<typename ExpressionType> class SwapWrapper; 00084 00085 template<typename XprType, int BlockRows=Dynamic, int BlockCols=Dynamic, bool InnerPanel = false> class Block; 00086 00087 template<typename MatrixType, int Size=Dynamic> class VectorBlock; 00088 template<typename MatrixType> class Transpose; 00089 template<typename MatrixType> class Conjugate; 00090 template<typename NullaryOp, typename MatrixType> class CwiseNullaryOp; 00091 template<typename UnaryOp, typename MatrixType> class CwiseUnaryOp; 00092 template<typename ViewOp, typename MatrixType> class CwiseUnaryView; 00093 template<typename BinaryOp, typename Lhs, typename Rhs> class CwiseBinaryOp; 00094 template<typename TernaryOp, typename Arg1, typename Arg2, typename Arg3> class CwiseTernaryOp; 00095 template<typename Decomposition, typename Rhstype> class Solve; 00096 template<typename XprType> class Inverse; 00097 00098 template<typename Lhs, typename Rhs, int Option = DefaultProduct> class Product; 00099 00100 template<typename Derived> class DiagonalBase; 00101 template<typename _DiagonalVectorType> class DiagonalWrapper; 00102 template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime=SizeAtCompileTime> class DiagonalMatrix; 00103 template<typename MatrixType, typename DiagonalType, int ProductOrder> class DiagonalProduct; 00104 template<typename MatrixType, int Index = 0> class Diagonal; 00105 template<int SizeAtCompileTime, int MaxSizeAtCompileTime = SizeAtCompileTime, typename IndexType=int> class PermutationMatrix; 00106 template<int SizeAtCompileTime, int MaxSizeAtCompileTime = SizeAtCompileTime, typename IndexType=int> class Transpositions; 00107 template<typename Derived> class PermutationBase; 00108 template<typename Derived> class TranspositionsBase; 00109 template<typename _IndicesType> class PermutationWrapper; 00110 template<typename _IndicesType> class TranspositionsWrapper; 00111 00112 template<typename Derived, 00113 int Level = internal::accessors_level<Derived>::has_write_access ? WriteAccessors : ReadOnlyAccessors 00114 > class MapBase; 00115 template<int InnerStrideAtCompileTime, int OuterStrideAtCompileTime> class Stride; 00116 template<int Value = Dynamic> class InnerStride; 00117 template<int Value = Dynamic> class OuterStride; 00118 template<typename MatrixType, int MapOptions=Unaligned, typename StrideType = Stride<0,0> > class Map; 00119 template<typename Derived> class RefBase; 00120 template<typename PlainObjectType, int Options = 0, 00121 typename StrideType = typename internal::conditional<PlainObjectType::IsVectorAtCompileTime,InnerStride<1>,OuterStride<> >::type > class Ref; 00122 00123 template<typename Derived> class TriangularBase; 00124 template<typename MatrixType, unsigned int Mode> class TriangularView; 00125 template<typename MatrixType, unsigned int Mode> class SelfAdjointView; 00126 template<typename MatrixType> class SparseView; 00127 template<typename ExpressionType> class WithFormat; 00128 template<typename MatrixType> struct CommaInitializer; 00129 template<typename Derived> class ReturnByValue; 00130 template<typename ExpressionType> class ArrayWrapper; 00131 template<typename ExpressionType> class MatrixWrapper; 00132 template<typename Derived> class SolverBase; 00133 template<typename XprType> class InnerIterator; 00134 00135 namespace internal { 00136 template<typename DecompositionType> struct kernel_retval_base; 00137 template<typename DecompositionType> struct kernel_retval; 00138 template<typename DecompositionType> struct image_retval_base; 00139 template<typename DecompositionType> struct image_retval; 00140 } // end namespace internal 00141 00142 namespace internal { 00143 template<typename _Scalar, int Rows=Dynamic, int Cols=Dynamic, int Supers=Dynamic, int Subs=Dynamic, int Options=0> class BandMatrix; 00144 } 00145 00146 namespace internal { 00147 template<typename Lhs, typename Rhs> struct product_type; 00148 00149 template<bool> struct EnableIf; 00150 00156 template< typename T, 00157 int ProductTag = internal::product_type<typename T::Lhs,typename T::Rhs>::ret, 00158 typename LhsShape = typename evaluator_traits<typename T::Lhs>::Shape, 00159 typename RhsShape = typename evaluator_traits<typename T::Rhs>::Shape, 00160 typename LhsScalar = typename traits<typename T::Lhs>::Scalar, 00161 typename RhsScalar = typename traits<typename T::Rhs>::Scalar 00162 > struct product_evaluator; 00163 } 00164 00165 template<typename Lhs, typename Rhs, 00166 int ProductType = internal::product_type<Lhs,Rhs>::value> 00167 struct ProductReturnType; 00168 00169 // this is a workaround for sun CC 00170 template<typename Lhs, typename Rhs> struct LazyProductReturnType; 00171 00172 namespace internal { 00173 00174 // Provides scalar/packet-wise product and product with accumulation 00175 // with optional conjugation of the arguments. 00176 template<typename LhsScalar, typename RhsScalar, bool ConjLhs=false, bool ConjRhs=false> struct conj_helper; 00177 00178 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_sum_op; 00179 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_difference_op; 00180 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_conj_product_op; 00181 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_min_op; 00182 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_max_op; 00183 template<typename Scalar> struct scalar_opposite_op; 00184 template<typename Scalar> struct scalar_conjugate_op; 00185 template<typename Scalar> struct scalar_real_op; 00186 template<typename Scalar> struct scalar_imag_op; 00187 template<typename Scalar> struct scalar_abs_op; 00188 template<typename Scalar> struct scalar_abs2_op; 00189 template<typename Scalar> struct scalar_sqrt_op; 00190 template<typename Scalar> struct scalar_rsqrt_op; 00191 template<typename Scalar> struct scalar_exp_op; 00192 template<typename Scalar> struct scalar_log_op; 00193 template<typename Scalar> struct scalar_cos_op; 00194 template<typename Scalar> struct scalar_sin_op; 00195 template<typename Scalar> struct scalar_acos_op; 00196 template<typename Scalar> struct scalar_asin_op; 00197 template<typename Scalar> struct scalar_tan_op; 00198 template<typename Scalar> struct scalar_inverse_op; 00199 template<typename Scalar> struct scalar_square_op; 00200 template<typename Scalar> struct scalar_cube_op; 00201 template<typename Scalar, typename NewType> struct scalar_cast_op; 00202 template<typename Scalar> struct scalar_random_op; 00203 template<typename Scalar> struct scalar_constant_op; 00204 template<typename Scalar> struct scalar_identity_op; 00205 template<typename Scalar,bool iscpx> struct scalar_sign_op; 00206 template<typename Scalar,typename ScalarExponent> struct scalar_pow_op; 00207 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_hypot_op; 00208 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_product_op; 00209 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_quotient_op; 00210 00211 // SpecialFunctions module 00212 template<typename Scalar> struct scalar_lgamma_op; 00213 template<typename Scalar> struct scalar_digamma_op; 00214 template<typename Scalar> struct scalar_erf_op; 00215 template<typename Scalar> struct scalar_erfc_op; 00216 template<typename Scalar> struct scalar_igamma_op; 00217 template<typename Scalar> struct scalar_igammac_op; 00218 template<typename Scalar> struct scalar_zeta_op; 00219 template<typename Scalar> struct scalar_betainc_op; 00220 00221 } // end namespace internal 00222 00223 struct IOFormat; 00224 00225 // Array module 00226 template<typename _Scalar, int _Rows, int _Cols, 00227 int _Options = AutoAlign | 00228 #if EIGEN_GNUC_AT(3,4) 00229 // workaround a bug in at least gcc 3.4.6 00230 // the innermost ?: ternary operator is misparsed. We write it slightly 00231 // differently and this makes gcc 3.4.6 happy, but it's ugly. 00232 // The error would only show up with EIGEN_DEFAULT_TO_ROW_MAJOR is defined 00233 // (when EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION is RowMajor) 00234 ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor 00235 : !(_Cols==1 && _Rows!=1) ? EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION 00236 : Eigen::ColMajor ), 00237 #else 00238 ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor 00239 : (_Cols==1 && _Rows!=1) ? Eigen::ColMajor 00240 : EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION ), 00241 #endif 00242 int _MaxRows = _Rows, int _MaxCols = _Cols> class Array; 00243 template<typename ConditionMatrixType, typename ThenMatrixType, typename ElseMatrixType> class Select; 00244 template<typename MatrixType, typename BinaryOp, int Direction> class PartialReduxExpr; 00245 template<typename ExpressionType, int Direction> class VectorwiseOp; 00246 template<typename MatrixType,int RowFactor,int ColFactor> class Replicate; 00247 template<typename MatrixType, int Direction = BothDirections> class Reverse; 00248 00249 template<typename MatrixType> class FullPivLU; 00250 template<typename MatrixType> class PartialPivLU; 00251 namespace internal { 00252 template<typename MatrixType> struct inverse_impl; 00253 } 00254 template<typename MatrixType> class HouseholderQR; 00255 template<typename MatrixType> class ColPivHouseholderQR; 00256 template<typename MatrixType> class FullPivHouseholderQR; 00257 template<typename MatrixType> class CompleteOrthogonalDecomposition; 00258 template<typename MatrixType, int QRPreconditioner = ColPivHouseholderQRPreconditioner> class JacobiSVD; 00259 template<typename MatrixType> class BDCSVD; 00260 template<typename MatrixType, int UpLo = Lower> class LLT; 00261 template<typename MatrixType, int UpLo = Lower> class LDLT; 00262 template<typename VectorsType, typename CoeffsType, int Side=OnTheLeft> class HouseholderSequence; 00263 template<typename Scalar> class JacobiRotation; 00264 00265 // Geometry module: 00266 template<typename Derived, int _Dim> class RotationBase; 00267 template<typename Lhs, typename Rhs> class Cross; 00268 template<typename Derived> class QuaternionBase; 00269 template<typename Scalar> class Rotation2D; 00270 template<typename Scalar> class AngleAxis; 00271 template<typename Scalar,int Dim> class Translation; 00272 template<typename Scalar,int Dim> class AlignedBox; 00273 template<typename Scalar, int Options = AutoAlign> class Quaternion; 00274 template<typename Scalar,int Dim,int Mode,int _Options=AutoAlign> class Transform; 00275 template <typename _Scalar, int _AmbientDim, int Options=AutoAlign> class ParametrizedLine; 00276 template <typename _Scalar, int _AmbientDim, int Options=AutoAlign> class Hyperplane; 00277 template<typename Scalar> class UniformScaling; 00278 template<typename MatrixType,int Direction> class Homogeneous; 00279 00280 // Sparse module: 00281 template<typename Derived> class SparseMatrixBase; 00282 00283 // MatrixFunctions module 00284 template<typename Derived> struct MatrixExponentialReturnValue; 00285 template<typename Derived> class MatrixFunctionReturnValue; 00286 template<typename Derived> class MatrixSquareRootReturnValue; 00287 template<typename Derived> class MatrixLogarithmReturnValue; 00288 template<typename Derived> class MatrixPowerReturnValue; 00289 template<typename Derived> class MatrixComplexPowerReturnValue; 00290 00291 namespace internal { 00292 template <typename Scalar> 00293 struct stem_function 00294 { 00295 typedef std::complex<typename NumTraits<Scalar>::Real> ComplexScalar; 00296 typedef ComplexScalar type(ComplexScalar, int); 00297 }; 00298 } 00299 00300 } // end namespace Eigen 00301 00302 #endif // EIGEN_FORWARDDECLARATIONS_H