MOAB  4.9.3pre
ForwardDeclarations.h
Go to the documentation of this file.
00001 // This file is part of Eigen, a lightweight C++ template library
00002 // for linear algebra.
00003 //
00004 // Copyright (C) 2007-2010 Benoit Jacob <[email protected]>
00005 // Copyright (C) 2008-2009 Gael Guennebaud <[email protected]>
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 Decomposition, typename Rhstype>        class Solve;
00095 template<typename XprType>                                class Inverse;
00096 
00097 template<typename Lhs, typename Rhs, int Option = DefaultProduct> class Product;
00098 
00099 template<typename Derived> class DiagonalBase;
00100 template<typename _DiagonalVectorType> class DiagonalWrapper;
00101 template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime=SizeAtCompileTime> class DiagonalMatrix;
00102 template<typename MatrixType, typename DiagonalType, int ProductOrder> class DiagonalProduct;
00103 template<typename MatrixType, int Index = 0> class Diagonal;
00104 template<int SizeAtCompileTime, int MaxSizeAtCompileTime = SizeAtCompileTime, typename IndexType=int> class PermutationMatrix;
00105 template<int SizeAtCompileTime, int MaxSizeAtCompileTime = SizeAtCompileTime, typename IndexType=int> class Transpositions;
00106 template<typename Derived> class PermutationBase;
00107 template<typename Derived> class TranspositionsBase;
00108 template<typename _IndicesType> class PermutationWrapper;
00109 template<typename _IndicesType> class TranspositionsWrapper;
00110 
00111 template<typename Derived,
00112          int Level = internal::accessors_level<Derived>::has_write_access ? WriteAccessors : ReadOnlyAccessors
00113 > class MapBase;
00114 template<int InnerStrideAtCompileTime, int OuterStrideAtCompileTime> class Stride;
00115 template<int Value = Dynamic> class InnerStride;
00116 template<int Value = Dynamic> class OuterStride;
00117 template<typename MatrixType, int MapOptions=Unaligned, typename StrideType = Stride<0,0> > class Map;
00118 template<typename Derived> class RefBase;
00119 template<typename PlainObjectType, int Options = 0,
00120          typename StrideType = typename internal::conditional<PlainObjectType::IsVectorAtCompileTime,InnerStride<1>,OuterStride<> >::type > class Ref;
00121 
00122 template<typename Derived> class TriangularBase;
00123 template<typename MatrixType, unsigned int Mode> class TriangularView;
00124 template<typename MatrixType, unsigned int Mode> class SelfAdjointView;
00125 template<typename MatrixType> class SparseView;
00126 template<typename ExpressionType> class WithFormat;
00127 template<typename MatrixType> struct CommaInitializer;
00128 template<typename Derived> class ReturnByValue;
00129 template<typename ExpressionType> class ArrayWrapper;
00130 template<typename ExpressionType> class MatrixWrapper;
00131 template<typename Derived> class SolverBase;
00132 template<typename XprType> class InnerIterator;
00133 
00134 namespace internal {
00135 template<typename DecompositionType> struct kernel_retval_base;
00136 template<typename DecompositionType> struct kernel_retval;
00137 template<typename DecompositionType> struct image_retval_base;
00138 template<typename DecompositionType> struct image_retval;
00139 } // end namespace internal
00140 
00141 namespace internal {
00142 template<typename _Scalar, int Rows=Dynamic, int Cols=Dynamic, int Supers=Dynamic, int Subs=Dynamic, int Options=0> class BandMatrix;
00143 }
00144 
00145 namespace internal {
00146 template<typename Lhs, typename Rhs> struct product_type;
00147 
00148 template<bool> struct EnableIf;
00149 
00155 template< typename T,
00156           int ProductTag = internal::product_type<typename T::Lhs,typename T::Rhs>::ret,
00157           typename LhsShape = typename evaluator_traits<typename T::Lhs>::Shape,
00158           typename RhsShape = typename evaluator_traits<typename T::Rhs>::Shape,
00159           typename LhsScalar = typename traits<typename T::Lhs>::Scalar,
00160           typename RhsScalar = typename traits<typename T::Rhs>::Scalar
00161         > struct product_evaluator;
00162 }
00163 
00164 template<typename Lhs, typename Rhs,
00165          int ProductType = internal::product_type<Lhs,Rhs>::value>
00166 struct ProductReturnType;
00167 
00168 // this is a workaround for sun CC
00169 template<typename Lhs, typename Rhs> struct LazyProductReturnType;
00170 
00171 namespace internal {
00172 
00173 // Provides scalar/packet-wise product and product with accumulation
00174 // with optional conjugation of the arguments.
00175 template<typename LhsScalar, typename RhsScalar, bool ConjLhs=false, bool ConjRhs=false> struct conj_helper;
00176 
00177 template<typename Scalar> struct scalar_sum_op;
00178 template<typename Scalar> struct scalar_difference_op;
00179 template<typename LhsScalar,typename RhsScalar> struct scalar_conj_product_op;
00180 template<typename Scalar> struct scalar_opposite_op;
00181 template<typename Scalar> struct scalar_conjugate_op;
00182 template<typename Scalar> struct scalar_real_op;
00183 template<typename Scalar> struct scalar_imag_op;
00184 template<typename Scalar> struct scalar_abs_op;
00185 template<typename Scalar> struct scalar_abs2_op;
00186 template<typename Scalar> struct scalar_sqrt_op;
00187 template<typename Scalar> struct scalar_rsqrt_op;
00188 template<typename Scalar> struct scalar_exp_op;
00189 template<typename Scalar> struct scalar_log_op;
00190 template<typename Scalar> struct scalar_cos_op;
00191 template<typename Scalar> struct scalar_sin_op;
00192 template<typename Scalar> struct scalar_acos_op;
00193 template<typename Scalar> struct scalar_asin_op;
00194 template<typename Scalar> struct scalar_tan_op;
00195 template<typename Scalar> struct scalar_pow_op;
00196 template<typename Scalar> struct scalar_inverse_op;
00197 template<typename Scalar> struct scalar_square_op;
00198 template<typename Scalar> struct scalar_cube_op;
00199 template<typename Scalar, typename NewType> struct scalar_cast_op;
00200 template<typename Scalar> struct scalar_multiple_op;
00201 template<typename Scalar> struct scalar_quotient1_op;
00202 template<typename Scalar> struct scalar_min_op;
00203 template<typename Scalar> struct scalar_max_op;
00204 template<typename Scalar> struct scalar_random_op;
00205 template<typename Scalar> struct scalar_add_op;
00206 template<typename Scalar> struct scalar_constant_op;
00207 template<typename Scalar> struct scalar_identity_op;
00208 template<typename Scalar,bool iscpx> struct scalar_sign_op;
00209 
00210 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_product_op;
00211 template<typename LhsScalar,typename RhsScalar> struct scalar_multiple2_op;
00212 template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_quotient_op;
00213 template<typename LhsScalar,typename RhsScalar> struct scalar_quotient2_op;
00214 
00215 } // end namespace internal
00216 
00217 struct IOFormat;
00218 
00219 // Array module
00220 template<typename _Scalar, int _Rows, int _Cols,
00221          int _Options = AutoAlign |
00222 #if EIGEN_GNUC_AT(3,4)
00223     // workaround a bug in at least gcc 3.4.6
00224     // the innermost ?: ternary operator is misparsed. We write it slightly
00225     // differently and this makes gcc 3.4.6 happy, but it's ugly.
00226     // The error would only show up with EIGEN_DEFAULT_TO_ROW_MAJOR is defined
00227     // (when EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION is RowMajor)
00228                           ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor
00229                           : !(_Cols==1 && _Rows!=1) ?  EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION
00230                           : Eigen::ColMajor ),
00231 #else
00232                           ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor
00233                           : (_Cols==1 && _Rows!=1) ? Eigen::ColMajor
00234                           : EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION ),
00235 #endif
00236          int _MaxRows = _Rows, int _MaxCols = _Cols> class Array;
00237 template<typename ConditionMatrixType, typename ThenMatrixType, typename ElseMatrixType> class Select;
00238 template<typename MatrixType, typename BinaryOp, int Direction> class PartialReduxExpr;
00239 template<typename ExpressionType, int Direction> class VectorwiseOp;
00240 template<typename MatrixType,int RowFactor,int ColFactor> class Replicate;
00241 template<typename MatrixType, int Direction = BothDirections> class Reverse;
00242 
00243 template<typename MatrixType> class FullPivLU;
00244 template<typename MatrixType> class PartialPivLU;
00245 namespace internal {
00246 template<typename MatrixType> struct inverse_impl;
00247 }
00248 template<typename MatrixType> class HouseholderQR;
00249 template<typename MatrixType> class ColPivHouseholderQR;
00250 template<typename MatrixType> class FullPivHouseholderQR;
00251 template<typename MatrixType> class CompleteOrthogonalDecomposition;
00252 template<typename MatrixType, int QRPreconditioner = ColPivHouseholderQRPreconditioner> class JacobiSVD;
00253 template<typename MatrixType> class BDCSVD;
00254 template<typename MatrixType, int UpLo = Lower> class LLT;
00255 template<typename MatrixType, int UpLo = Lower> class LDLT;
00256 template<typename VectorsType, typename CoeffsType, int Side=OnTheLeft> class HouseholderSequence;
00257 template<typename Scalar>     class JacobiRotation;
00258 
00259 // Geometry module:
00260 template<typename Derived, int _Dim> class RotationBase;
00261 template<typename Lhs, typename Rhs> class Cross;
00262 template<typename Derived> class QuaternionBase;
00263 template<typename Scalar> class Rotation2D;
00264 template<typename Scalar> class AngleAxis;
00265 template<typename Scalar,int Dim> class Translation;
00266 template<typename Scalar,int Dim> class AlignedBox;
00267 template<typename Scalar, int Options = AutoAlign> class Quaternion;
00268 template<typename Scalar,int Dim,int Mode,int _Options=AutoAlign> class Transform;
00269 template <typename _Scalar, int _AmbientDim, int Options=AutoAlign> class ParametrizedLine;
00270 template <typename _Scalar, int _AmbientDim, int Options=AutoAlign> class Hyperplane;
00271 template<typename Scalar> class UniformScaling;
00272 template<typename MatrixType,int Direction> class Homogeneous;
00273 
00274 // Sparse module:
00275 template<typename Derived> class SparseMatrixBase;
00276 
00277 // MatrixFunctions module
00278 template<typename Derived> struct MatrixExponentialReturnValue;
00279 template<typename Derived> class MatrixFunctionReturnValue;
00280 template<typename Derived> class MatrixSquareRootReturnValue;
00281 template<typename Derived> class MatrixLogarithmReturnValue;
00282 template<typename Derived> class MatrixPowerReturnValue;
00283 template<typename Derived> class MatrixComplexPowerReturnValue;
00284 
00285 namespace internal {
00286 template <typename Scalar>
00287 struct stem_function
00288 {
00289   typedef std::complex<typename NumTraits<Scalar>::Real> ComplexScalar;
00290   typedef ComplexScalar type(ComplexScalar, int);
00291 };
00292 }
00293 
00294 } // end namespace Eigen
00295 
00296 #endif // EIGEN_FORWARDDECLARATIONS_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines