Medial Code Documentation
Loading...
Searching...
No Matches
Constants.h
1// This file is part of Eigen, a lightweight C++ template library
2// for linear algebra.
3//
4// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>
5// Copyright (C) 2007-2009 Benoit Jacob <jacob.benoit.1@gmail.com>
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_CONSTANTS_H
12#define EIGEN_CONSTANTS_H
13
14namespace Eigen {
15
21const int Dynamic = -1;
22
26const int DynamicIndex = 0xffffff;
27
31const int Infinity = -1;
32
39const int HugeCost = 10000;
40
61const unsigned int RowMajorBit = 0x1;
62
65const unsigned int EvalBeforeNestingBit = 0x2;
66
70const unsigned int EvalBeforeAssigningBit = 0x4; // FIXME deprecated
71
88const unsigned int PacketAccessBit = 0x8;
89
90#ifdef EIGEN_VECTORIZE
99const unsigned int ActualPacketAccessBit = PacketAccessBit;
100#else
101const unsigned int ActualPacketAccessBit = 0x0;
102#endif
103
124const unsigned int LinearAccessBit = 0x10;
125
138const unsigned int LvalueBit = 0x20;
139
149const unsigned int DirectAccessBit = 0x40;
150
161const unsigned int AlignedBit = 0x80;
162
163const unsigned int NestByRefBit = 0x100;
164
172const unsigned int NoPreferredStorageOrderBit = 0x200;
173
185const unsigned int CompressedAccessBit = 0x400;
186
187
188// list of flags that are inherited by default
189const unsigned int HereditaryBits = RowMajorBit
192
202enum {
204 Lower=0x1,
206 Upper=0x2,
222 Symmetric=0x20
224
227enum {
234 AlignedMask=255,
236#if EIGEN_MAX_ALIGN_BYTES==128
237 AlignedMax = Aligned128
238#elif EIGEN_MAX_ALIGN_BYTES==64
239 AlignedMax = Aligned64
240#elif EIGEN_MAX_ALIGN_BYTES==32
241 AlignedMax = Aligned32
242#elif EIGEN_MAX_ALIGN_BYTES==16
243 AlignedMax = Aligned16
244#elif EIGEN_MAX_ALIGN_BYTES==8
245 AlignedMax = Aligned8
246#elif EIGEN_MAX_ALIGN_BYTES==0
247 AlignedMax = Unaligned
248#else
249#error Invalid value for EIGEN_MAX_ALIGN_BYTES
250#endif
251};
252
255// FIXME after the corner() API change, this was not needed anymore, except by AlignedBox
256// TODO: find out what to do with that. Adapt the AlignedBox API ?
257enum CornerType { TopLeft, TopRight, BottomLeft, BottomRight };
258
273
276enum {
278 DefaultTraversal,
280 LinearTraversal,
283 InnerVectorizedTraversal,
286 LinearVectorizedTraversal,
289 SliceVectorizedTraversal,
291 InvalidTraversal,
293 AllAtOnceTraversal
294};
295
298enum {
300 NoUnrolling,
302 InnerUnrolling,
305 CompleteUnrolling
306};
307
310enum {
311 Specialized,
312 BuiltIn
313};
314
318enum {
322 RowMajor = 0x1, // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that
// FIXME --- clarify the situation
326 DontAlign = 0x2
328
331enum {
335 OnTheRight = 2
337
338/* the following used to be written as:
339 *
340 * struct NoChange_t {};
341 * namespace {
342 * EIGEN_UNUSED NoChange_t NoChange;
343 * }
344 *
345 * on the ground that it feels dangerous to disambiguate overloaded functions on enum/integer types.
346 * However, this leads to "variable declared but never referenced" warnings on Intel Composer XE,
347 * and we do not know how to get rid of them (bug 450).
348 */
349
350enum NoChange_t { NoChange };
351enum Sequential_t { Sequential };
352enum Default_t { Default };
353
356enum {
357 IsDense = 0,
358 IsSparse
359};
360
374
379 Pivoting = 0x01,
381 NoPivoting = 0x02,
400 Ax_lBx = 0x100,
403 ABx_lx = 0x200,
406 BAx_lx = 0x400,
408 GenEigMask = Ax_lBx | ABx_lx | BAx_lx
409};
410
423
424#ifdef Success
425#error The preprocessor symbol 'Success' is defined, possibly by the X11 header file X.h
426#endif
427
441
456
459namespace Architecture
460{
461 enum Type {
462 Generic = 0x0,
463 SSE = 0x1,
464 AltiVec = 0x2,
465 VSX = 0x3,
466 NEON = 0x4,
467#if defined EIGEN_VECTORIZE_SSE
468 Target = SSE
469#elif defined EIGEN_VECTORIZE_ALTIVEC
470 Target = AltiVec
471#elif defined EIGEN_VECTORIZE_VSX
472 Target = VSX
473#elif defined EIGEN_VECTORIZE_NEON
474 Target = NEON
475#else
476 Target = Generic
477#endif
478 };
479}
480
483enum { DefaultProduct=0, LazyProduct, AliasFreeProduct, CoeffBasedProductMode, LazyCoeffBasedProductMode, OuterProduct, InnerProduct, GemvProduct, GemmProduct };
484
487enum Action {GetAction, SetAction};
488
490struct Dense {};
491
493struct Sparse {};
494
497
500
503
505struct MatrixXpr {};
506
508struct ArrayXpr {};
509
510// An evaluator must define its shape. By default, it can be one of the following:
511struct DenseShape { static std::string debugName() { return "DenseShape"; } };
512struct SolverShape { static std::string debugName() { return "SolverShape"; } };
513struct HomogeneousShape { static std::string debugName() { return "HomogeneousShape"; } };
514struct DiagonalShape { static std::string debugName() { return "DiagonalShape"; } };
515struct BandShape { static std::string debugName() { return "BandShape"; } };
516struct TriangularShape { static std::string debugName() { return "TriangularShape"; } };
517struct SelfAdjointShape { static std::string debugName() { return "SelfAdjointShape"; } };
518struct PermutationShape { static std::string debugName() { return "PermutationShape"; } };
519struct TranspositionsShape { static std::string debugName() { return "TranspositionsShape"; } };
520struct SparseShape { static std::string debugName() { return "SparseShape"; } };
521
522namespace internal {
523
524 // random access iterators based on coeff*() accessors.
525struct IndexBased {};
526
527// evaluator based on iterators to access coefficients.
529
533enum ComparisonName {
534 cmp_EQ = 0,
535 cmp_LT = 1,
536 cmp_LE = 2,
537 cmp_UNORD = 3,
538 cmp_NEQ = 4,
539 cmp_GT = 5,
540 cmp_GE = 6
541};
542} // end namespace internal
543
544} // end namespace Eigen
545
546#endif // EIGEN_CONSTANTS_H
QRPreconditioners
Possible values for the QRPreconditioner template parameter of JacobiSVD.
Definition Constants.h:413
ComputationInfo
Enum for reporting the status of a computation.
Definition Constants.h:430
AccessorLevels
Used as template parameter in DenseCoeffBase and MapBase to indicate which accessors should be provid...
Definition Constants.h:364
CornerType
Enum used by DenseBase::corner() in Eigen2 compatibility mode.
Definition Constants.h:257
DirectionType
Enum containing possible values for the Direction parameter of Reverse, PartialReduxExpr and Vectorwi...
Definition Constants.h:262
DecompositionOptions
Enum with options to give to various decompositions.
Definition Constants.h:377
TransformTraits
Enum used to specify how a particular transformation is stored in a matrix.
Definition Constants.h:445
@ StrictlyLower
View matrix as a lower triangular matrix with zeros on the diagonal.
Definition Constants.h:216
@ UnitDiag
Matrix has ones on the diagonal; to be used in combination with #Lower or #Upper.
Definition Constants.h:208
@ StrictlyUpper
View matrix as an upper triangular matrix with zeros on the diagonal.
Definition Constants.h:218
@ UnitLower
View matrix as a lower triangular matrix with ones on the diagonal.
Definition Constants.h:212
@ ZeroDiag
Matrix has zeros on the diagonal; to be used in combination with #Lower or #Upper.
Definition Constants.h:210
@ SelfAdjoint
Used in BandMatrix and SelfAdjointView to indicate that the matrix is self-adjoint.
Definition Constants.h:220
@ Symmetric
Used to support symmetric, non-selfadjoint, complex matrices.
Definition Constants.h:222
@ UnitUpper
View matrix as an upper triangular matrix with ones on the diagonal.
Definition Constants.h:214
@ Lower
View matrix as a lower triangular matrix.
Definition Constants.h:204
@ Upper
View matrix as an upper triangular matrix.
Definition Constants.h:206
@ NoQRPreconditioner
Do not specify what is to be done if the SVD of a non-square matrix is asked for.
Definition Constants.h:415
@ HouseholderQRPreconditioner
Use a QR decomposition without pivoting as the first step.
Definition Constants.h:417
@ ColPivHouseholderQRPreconditioner
Use a QR decomposition with column pivoting as the first step.
Definition Constants.h:419
@ FullPivHouseholderQRPreconditioner
Use a QR decomposition with full pivoting as the first step.
Definition Constants.h:421
@ NumericalIssue
The provided data did not satisfy the prerequisites.
Definition Constants.h:434
@ InvalidInput
The inputs are invalid, or the algorithm has been improperly called.
Definition Constants.h:439
@ Success
Computation was successful.
Definition Constants.h:432
@ NoConvergence
Iterative procedure did not converge.
Definition Constants.h:436
@ Aligned64
Data pointer is aligned on a 64 bytes boundary.
Definition Constants.h:232
@ Unaligned
Data pointer has no specific alignment.
Definition Constants.h:228
@ Aligned128
Data pointer is aligned on a 128 bytes boundary.
Definition Constants.h:233
@ Aligned32
Data pointer is aligned on a 32 bytes boundary.
Definition Constants.h:231
@ Aligned8
Data pointer is aligned on a 8 bytes boundary.
Definition Constants.h:229
@ Aligned16
Data pointer is aligned on a 16 bytes boundary.
Definition Constants.h:230
@ Aligned
Definition Constants.h:235
@ ColMajor
Storage order is column major (see TopicStorageOrders).
Definition Constants.h:320
@ DontAlign
Don't require alignment for the matrix itself (the array of coefficients, if dynamically allocated,...
Definition Constants.h:326
@ 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
@ OnTheLeft
Apply transformation on the left.
Definition Constants.h:333
@ OnTheRight
Apply transformation on the right.
Definition Constants.h:335
@ BothDirections
For Reverse, both rows and columns are reversed; not used for PartialReduxExpr and VectorwiseOp.
Definition Constants.h:271
@ Horizontal
For Reverse, all rows are reversed; for PartialReduxExpr and VectorwiseOp, act on rows.
Definition Constants.h:268
@ Vertical
For Reverse, all columns are reversed; for PartialReduxExpr and VectorwiseOp, act on columns.
Definition Constants.h:265
@ ComputeFullV
Used in JacobiSVD to indicate that the square matrix V is to be computed.
Definition Constants.h:387
@ ComputeThinV
Used in JacobiSVD to indicate that the thin matrix V is to be computed.
Definition Constants.h:389
@ Ax_lBx
Used in GeneralizedSelfAdjointEigenSolver to indicate that it should solve the generalized eigenprobl...
Definition Constants.h:400
@ ComputeEigenvectors
Used in SelfAdjointEigenSolver and GeneralizedSelfAdjointEigenSolver to specify that both the eigenva...
Definition Constants.h:395
@ BAx_lx
Used in GeneralizedSelfAdjointEigenSolver to indicate that it should solve the generalized eigenprobl...
Definition Constants.h:406
@ ABx_lx
Used in GeneralizedSelfAdjointEigenSolver to indicate that it should solve the generalized eigenprobl...
Definition Constants.h:403
@ ComputeFullU
Used in JacobiSVD to indicate that the square matrix U is to be computed.
Definition Constants.h:383
@ ComputeThinU
Used in JacobiSVD to indicate that the thin matrix U is to be computed.
Definition Constants.h:385
@ EigenvaluesOnly
Used in SelfAdjointEigenSolver and GeneralizedSelfAdjointEigenSolver to specify that only the eigenva...
Definition Constants.h:392
@ Affine
Transformation is an affine transformation stored as a (Dim+1)^2 matrix whose last row is assumed to ...
Definition Constants.h:450
@ Projective
Transformation is a general projective transformation stored as a (Dim+1)^2 matrix.
Definition Constants.h:454
@ AffineCompact
Transformation is an affine transformation stored as a (Dim) x (Dim+1) matrix.
Definition Constants.h:452
@ Isometry
Transformation is an isometry.
Definition Constants.h:447
const unsigned int AlignedBit
Definition Constants.h:161
const unsigned int PacketAccessBit
Short version: means the expression might be vectorized.
Definition Constants.h:88
const unsigned int NoPreferredStorageOrderBit
for an expression, this means that the storage order can be either row-major or column-major.
Definition Constants.h:172
const unsigned int LinearAccessBit
Short version: means the expression can be seen as 1D vector.
Definition Constants.h:124
const unsigned int EvalBeforeAssigningBit
Definition Constants.h:70
const unsigned int EvalBeforeNestingBit
means the expression should be evaluated by the calling expression
Definition Constants.h:65
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
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition Constants.h:61
const unsigned int CompressedAccessBit
Means that the underlying coefficients can be accessed through pointers to the sparse (un)compressed ...
Definition Constants.h:185
The type used to identify an array expression.
Definition Constants.h:508
Definition Constants.h:515
Definition Constants.h:511
The type used to identify a dense storage.
Definition Constants.h:490
Definition Constants.h:514
Definition Constants.h:513
The type used to identify a matrix expression.
Definition Constants.h:505
Definition Constants.h:518
The type used to identify a permutation storage.
Definition Constants.h:499
Definition Constants.h:517
Definition Constants.h:512
The type used to identify a general solver (foctored) storage.
Definition Constants.h:496
Definition Constants.h:520
The type used to identify a general sparse storage.
Definition Constants.h:493
Definition Constants.h:519
The type used to identify a permutation storage.
Definition Constants.h:502
Definition Constants.h:516
Definition Constants.h:525
Definition Constants.h:528