Eigen  3.3.3
Constants.h
00001 // This file is part of Eigen, a lightweight C++ template library
00002 // for linear algebra.
00003 //
00004 // Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>
00005 // Copyright (C) 2007-2009 Benoit Jacob <jacob.benoit.1@gmail.com>
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_CONSTANTS_H
00012 #define EIGEN_CONSTANTS_H
00013 
00014 namespace Eigen {
00015 
00021 const int Dynamic = -1;
00022 
00026 const int DynamicIndex = 0xffffff;
00027 
00031 const int Infinity = -1;
00032 
00039 const int HugeCost = 10000;
00040 
00061 const unsigned int RowMajorBit = 0x1;
00062 
00065 const unsigned int EvalBeforeNestingBit = 0x2;
00066 
00070 EIGEN_DEPRECATED
00071 const unsigned int EvalBeforeAssigningBit = 0x4; // FIXME deprecated
00072 
00089 const unsigned int PacketAccessBit = 0x8;
00090 
00091 #ifdef EIGEN_VECTORIZE
00092 
00100 const unsigned int ActualPacketAccessBit = PacketAccessBit;
00101 #else
00102 const unsigned int ActualPacketAccessBit = 0x0;
00103 #endif
00104 
00125 const unsigned int LinearAccessBit = 0x10;
00126 
00139 const unsigned int LvalueBit = 0x20;
00140 
00150 const unsigned int DirectAccessBit = 0x40;
00151 
00162 EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
00163 
00164 const unsigned int NestByRefBit = 0x100;
00165 
00173 const unsigned int NoPreferredStorageOrderBit = 0x200;
00174 
00186 const unsigned int CompressedAccessBit = 0x400;
00187 
00188 
00189 // list of flags that are inherited by default
00190 const unsigned int HereditaryBits = RowMajorBit
00191                                   | EvalBeforeNestingBit;
00192 
00202 enum UpLoType {
00204   Lower=0x1,                      
00206   Upper=0x2,                      
00208   UnitDiag=0x4, 
00210   ZeroDiag=0x8,
00212   UnitLower=UnitDiag|Lower, 
00214   UnitUpper=UnitDiag|Upper,
00216   StrictlyLower=ZeroDiag|Lower, 
00218   StrictlyUpper=ZeroDiag|Upper,
00220   SelfAdjoint=0x10,
00222   Symmetric=0x20
00223 };
00224 
00227 enum AlignmentType {
00228   Unaligned=0,        
00229   Aligned8=8,         
00230   Aligned16=16,       
00231   Aligned32=32,       
00232   Aligned64=64,       
00233   Aligned128=128,     
00234   AlignedMask=255,
00235   Aligned=16,         
00236 #if EIGEN_MAX_ALIGN_BYTES==128
00237   AlignedMax = Aligned128
00238 #elif EIGEN_MAX_ALIGN_BYTES==64
00239   AlignedMax = Aligned64
00240 #elif EIGEN_MAX_ALIGN_BYTES==32
00241   AlignedMax = Aligned32
00242 #elif EIGEN_MAX_ALIGN_BYTES==16
00243   AlignedMax = Aligned16
00244 #elif EIGEN_MAX_ALIGN_BYTES==8
00245   AlignedMax = Aligned8
00246 #elif EIGEN_MAX_ALIGN_BYTES==0
00247   AlignedMax = Unaligned
00248 #else
00249 #error Invalid value for EIGEN_MAX_ALIGN_BYTES
00250 #endif
00251 };
00252 
00255 // FIXME after the corner() API change, this was not needed anymore, except by AlignedBox
00256 // TODO: find out what to do with that. Adapt the AlignedBox API ?
00257 enum CornerType { TopLeft, TopRight, BottomLeft, BottomRight };
00258 
00262 enum DirectionType { 
00265   Vertical, 
00268   Horizontal, 
00271   BothDirections 
00272 };
00273 
00276 enum TraversalType {
00278   DefaultTraversal,
00280   LinearTraversal,
00283   InnerVectorizedTraversal,
00286   LinearVectorizedTraversal,
00289   SliceVectorizedTraversal,
00291   InvalidTraversal,
00293   AllAtOnceTraversal
00294 };
00295 
00298 enum UnrollingType {
00300   NoUnrolling,
00302   InnerUnrolling,
00305   CompleteUnrolling
00306 };
00307 
00310 enum SpecializedType {
00311   Specialized,
00312   BuiltIn
00313 };
00314 
00318 enum StorageOptions {
00320   ColMajor = 0,
00322   RowMajor = 0x1,  // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that
00324   AutoAlign = 0, // FIXME --- clarify the situation
00326   DontAlign = 0x2
00327 };
00328 
00331 enum SideType {
00333   OnTheLeft = 1,  
00335   OnTheRight = 2  
00336 };
00337 
00338 /* the following used to be written as:
00339  *
00340  *   struct NoChange_t {};
00341  *   namespace {
00342  *     EIGEN_UNUSED NoChange_t NoChange;
00343  *   }
00344  *
00345  * on the ground that it feels dangerous to disambiguate overloaded functions on enum/integer types.  
00346  * However, this leads to "variable declared but never referenced" warnings on Intel Composer XE,
00347  * and we do not know how to get rid of them (bug 450).
00348  */
00349 
00350 enum NoChange_t   { NoChange };
00351 enum Sequential_t { Sequential };
00352 enum Default_t    { Default };
00353 
00356 enum AmbiVectorMode {
00357   IsDense         = 0,
00358   IsSparse
00359 };
00360 
00364 enum AccessorLevels {
00366   ReadOnlyAccessors, 
00368   WriteAccessors, 
00370   DirectAccessors, 
00372   DirectWriteAccessors
00373 };
00374 
00377 enum DecompositionOptions {
00379   Pivoting            = 0x01, 
00381   NoPivoting          = 0x02, 
00383   ComputeFullU        = 0x04,
00385   ComputeThinU        = 0x08,
00387   ComputeFullV        = 0x10,
00389   ComputeThinV        = 0x20,
00392   EigenvaluesOnly     = 0x40,
00395   ComputeEigenvectors = 0x80,
00397   EigVecMask = EigenvaluesOnly | ComputeEigenvectors,
00400   Ax_lBx              = 0x100,
00403   ABx_lx              = 0x200,
00406   BAx_lx              = 0x400,
00408   GenEigMask = Ax_lBx | ABx_lx | BAx_lx
00409 };
00410 
00413 enum QRPreconditioners {
00415   NoQRPreconditioner,
00417   HouseholderQRPreconditioner,
00419   ColPivHouseholderQRPreconditioner,
00421   FullPivHouseholderQRPreconditioner
00422 };
00423 
00424 #ifdef Success
00425 #error The preprocessor symbol 'Success' is defined, possibly by the X11 header file X.h
00426 #endif
00427 
00430 enum ComputationInfo {
00432   Success = 0,        
00434   NumericalIssue = 1, 
00436   NoConvergence = 2,
00439   InvalidInput = 3
00440 };
00441 
00445 enum TransformTraits {
00447   Isometry      = 0x1,
00450   Affine        = 0x2,
00452   AffineCompact = 0x10 | Affine,
00454   Projective    = 0x20
00455 };
00456 
00459 namespace Architecture
00460 {
00461   enum Type {
00462     Generic = 0x0,
00463     SSE = 0x1,
00464     AltiVec = 0x2,
00465     VSX = 0x3,
00466     NEON = 0x4,
00467 #if defined EIGEN_VECTORIZE_SSE
00468     Target = SSE
00469 #elif defined EIGEN_VECTORIZE_ALTIVEC
00470     Target = AltiVec
00471 #elif defined EIGEN_VECTORIZE_VSX
00472     Target = VSX
00473 #elif defined EIGEN_VECTORIZE_NEON
00474     Target = NEON
00475 #else
00476     Target = Generic
00477 #endif
00478   };
00479 }
00480 
00483 enum ProductImplType
00484 { DefaultProduct=0, LazyProduct, AliasFreeProduct, CoeffBasedProductMode, LazyCoeffBasedProductMode, OuterProduct, InnerProduct, GemvProduct, GemmProduct };
00485 
00488 enum Action {GetAction, SetAction};
00489 
00491 struct Dense {};
00492 
00494 struct Sparse {};
00495 
00497 struct SolverStorage {};
00498 
00500 struct PermutationStorage {};
00501 
00503 struct TranspositionsStorage {};
00504 
00506 struct MatrixXpr {};
00507 
00509 struct ArrayXpr {};
00510 
00511 // An evaluator must define its shape. By default, it can be one of the following:
00512 struct DenseShape             { static std::string debugName() { return "DenseShape"; } };
00513 struct SolverShape            { static std::string debugName() { return "SolverShape"; } };
00514 struct HomogeneousShape       { static std::string debugName() { return "HomogeneousShape"; } };
00515 struct DiagonalShape          { static std::string debugName() { return "DiagonalShape"; } };
00516 struct BandShape              { static std::string debugName() { return "BandShape"; } };
00517 struct TriangularShape        { static std::string debugName() { return "TriangularShape"; } };
00518 struct SelfAdjointShape       { static std::string debugName() { return "SelfAdjointShape"; } };
00519 struct PermutationShape       { static std::string debugName() { return "PermutationShape"; } };
00520 struct TranspositionsShape    { static std::string debugName() { return "TranspositionsShape"; } };
00521 struct SparseShape            { static std::string debugName() { return "SparseShape"; } };
00522 
00523 namespace internal {
00524 
00525   // random access iterators based on coeff*() accessors.
00526 struct IndexBased {};
00527 
00528 // evaluator based on iterators to access coefficients. 
00529 struct IteratorBased {};
00530 
00534 enum ComparisonName {
00535   cmp_EQ = 0,
00536   cmp_LT = 1,
00537   cmp_LE = 2,
00538   cmp_UNORD = 3,
00539   cmp_NEQ = 4,
00540   cmp_GT = 5,
00541   cmp_GE = 6
00542 };
00543 } // end namespace internal
00544 
00545 } // end namespace Eigen
00546 
00547 #endif // EIGEN_CONSTANTS_H
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends