11 #ifndef EIGEN_XPRHELPER_H 12 #define EIGEN_XPRHELPER_H 17 #if (defined __GNUG__) && !((__GNUC__==4) && (__GNUC_MINOR__==3)) 18 #define EIGEN_EMPTY_STRUCT_CTOR(X) \ 19 EIGEN_STRONG_INLINE X() {} \ 20 EIGEN_STRONG_INLINE X(const X& ) {} 22 #define EIGEN_EMPTY_STRUCT_CTOR(X) 27 typedef EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex;
39 template<
typename I1,
typename I2>
54 static T value() {
return T(Value); }
64 T value()
const {
return m_value; }
65 void setValue(
T value) { m_value = value; }
75 static T value() {
return T(Value); }
85 T value()
const {
return m_value; }
86 void setValue(
T value) { m_value = value; }
107 template<
typename _Scalar,
int _Rows,
int _Cols,
111 : EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION ),
112 int _MaxRows = _Rows,
117 IsColVector = _Cols==1 && _Rows!=1,
118 IsRowVector = _Rows==1 && _Cols!=1,
127 template<
typename Scalar,
int Rows,
int Cols,
int Options,
int MaxRows,
int MaxCols>
138 #if EIGEN_ALIGN_STATICALLY 139 ((!is_dynamic_size_storage) && (((MaxCols*MaxRows*
int(
sizeof(Scalar))) % 16) == 0))
147 is_dynamic_size_storage
170 template<typename T, typename StorageKind = typename traits<T>::StorageKind>
struct plain_matrix_type;
203 template<typename T, typename StorageKind = typename traits<T>::StorageKind>
struct eval;
219 template<
typename _Scalar,
int _Rows,
int _Cols,
int _Options,
int _MaxRows,
int _MaxCols>
225 template<
typename _Scalar,
int _Rows,
int _Cols,
int _Options,
int _MaxRows,
int _MaxCols>
275 template <
typename T>
286 template<
typename T1,
typename T2>
316 template<typename T, int n=1, typename PlainObject = typename eval<T>::type>
struct nested 324 DynamicAsInteger = 10000,
326 ScalarReadCostAsInteger = ScalarReadCost ==
Dynamic ? int(DynamicAsInteger) : int(ScalarReadCost),
328 CoeffReadCostAsInteger = CoeffReadCost ==
Dynamic ? int(DynamicAsInteger) : int(CoeffReadCost),
329 NAsInteger = n ==
Dynamic ? int(DynamicAsInteger) : n,
330 CostEvalAsInteger = (NAsInteger+1) * ScalarReadCostAsInteger + CoeffReadCostAsInteger,
331 CostNoEvalAsInteger = NAsInteger * CoeffReadCostAsInteger
336 int(CostEvalAsInteger) < int(CostNoEvalAsInteger)
344 inline T* const_cast_ptr(
const T* ptr)
346 return const_cast<T*
>(ptr);
349 template<typename Derived, typename XprKind = typename traits<Derived>::XprKind>
355 template<
typename Derived>
361 template<
typename Derived>
369 template<
typename Derived,
typename Scalar,
typename OtherScalar,
typename BaseType,
378 template<
typename Derived,
typename Scalar,
typename OtherScalar,
typename BaseType>
382 operator*(
const OtherScalar& scalar)
const 384 return CwiseUnaryOp<scalar_multiple2_op<Scalar,OtherScalar>, Derived>
388 inline friend const CwiseUnaryOp<scalar_multiple2_op<Scalar,OtherScalar>, Derived>
389 operator*(
const OtherScalar& scalar,
const Derived& matrix)
412 template<
typename ExpressionType,
typename Scalar =
typename ExpressionType::Scalar>
415 typedef Matrix<
Scalar, 1, ExpressionType::ColsAtCompileTime,
416 ExpressionType::PlainObject::Options |
RowMajor, 1, ExpressionType::MaxColsAtCompileTime>
MatrixRowType;
417 typedef Array<
Scalar, 1, ExpressionType::ColsAtCompileTime,
418 ExpressionType::PlainObject::Options |
RowMajor, 1, ExpressionType::MaxColsAtCompileTime>
ArrayRowType;
420 typedef typename conditional<
427 template<
typename ExpressionType,
typename Scalar =
typename ExpressionType::Scalar>
430 typedef Matrix<
Scalar, ExpressionType::RowsAtCompileTime, 1,
431 ExpressionType::PlainObject::Options & ~
RowMajor, ExpressionType::MaxRowsAtCompileTime, 1>
MatrixColType;
432 typedef Array<
Scalar, ExpressionType::RowsAtCompileTime, 1,
433 ExpressionType::PlainObject::Options & ~
RowMajor, ExpressionType::MaxRowsAtCompileTime, 1>
ArrayColType;
435 typedef typename conditional<
442 template<
typename ExpressionType,
typename Scalar =
typename ExpressionType::Scalar>
445 enum { diag_size = EIGEN_SIZE_MIN_PREFER_DYNAMIC(ExpressionType::RowsAtCompileTime, ExpressionType::ColsAtCompileTime),
446 max_diag_size = EIGEN_SIZE_MIN_PREFER_FIXED(ExpressionType::MaxRowsAtCompileTime, ExpressionType::MaxColsAtCompileTime)
451 typedef typename conditional<
458 template<
typename ExpressionType>
469 #endif // EIGEN_XPRHELPER_H Definition: XprHelper.h:393
Definition: XprHelper.h:114
Definition: XprHelper.h:101
Definition: XprHelper.h:235
const unsigned int DirectAccessBit
Means that the underlying array of coefficients can be directly accessed as a plain strided array...
Definition: Constants.h:142
Definition: XprHelper.h:170
const unsigned int LvalueBit
Means the expression has a coeffRef() method, i.e.
Definition: Constants.h:131
Definition: XprHelper.h:287
iterative scaling algorithm to equilibrate rows and column norms in matrices
Definition: TestIMU_Common.h:87
const int DynamicIndex
This value means that a signed quantity (e.g., a signed index) is not known at compile-time, and that instead its value has to be specified at runtime.
Definition: Constants.h:26
Holds information about the various numeric (i.e.
Definition: NumTraits.h:88
const internal::permut_matrix_product_retval< PermutationDerived, Derived, OnTheRight > operator*(const MatrixBase< Derived > &matrix, const PermutationBase< PermutationDerived > &permutation)
Definition: PermutationMatrix.h:539
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition: Constants.h:53
Definition: XprHelper.h:253
Definition: XprHelper.h:32
const unsigned int PacketAccessBit
Short version: means the expression might be vectorized.
Definition: Constants.h:81
Definition: XprHelper.h:70
Definition: XprHelper.h:350
The type used to identify a matrix expression.
Definition: Constants.h:431
Definition: GenericPacketMath.h:71
const unsigned int AlignedBit
means the first coefficient packet is guaranteed to be aligned
Definition: Constants.h:147
detail::size< coerce_list< Ts... >> size
Get the size of a list (number of elements.)
Definition: Size.h:56
Definition: XprHelper.h:443
Storage order is column major (see TopicStorageOrders).
Definition: Constants.h:264
Definition: Functors.h:519
Definition: XprHelper.h:371
Definition: XprHelper.h:171
Definition: XprHelper.h:49
Definition: XprHelper.h:276
Base class for all 1D and 2D array, and related expressions.
Definition: ArrayBase.h:39
Definition: BandTriangularSolver.h:13
Definition: XprHelper.h:89
Definition: XprHelper.h:428
Storage order is row major (see TopicStorageOrders).
Definition: Constants.h:266
Don't require alignment for the matrix itself (the array of coefficients, if dynamically allocated...
Definition: Constants.h:270
Definition: XprHelper.h:128
General-purpose arrays with easy API for coefficient-wise operations.
Definition: Array.h:42
Definition: XprHelper.h:316
The type used to identify a dense storage.
Definition: Constants.h:428
The type used to identify an array expression.
Definition: Constants.h:434
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time, and that instead the value is stored in some runtime variable.
Definition: Constants.h:21
const unsigned int EvalBeforeNestingBit
means the expression should be evaluated by the calling expression
Definition: Constants.h:58
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition: CwiseUnaryOp.h:59
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:127
Definition: XprHelper.h:413
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
const unsigned int LinearAccessBit
Short version: means the expression can be seen as 1D vector.
Definition: Constants.h:117
Definition: ForwardDeclarations.h:17
Definition: XprHelper.h:459
Definition: XprHelper.h:203
Definition: osvr_print_tree.cpp:52
Definition: XprHelper.h:161
Align the matrix itself if it is vectorizable fixed-size.
Definition: Constants.h:268
double Scalar
Common scalar type.
Definition: FlexibleKalmanBase.h:48
Definition: XprHelper.h:270