11 #ifndef EIGEN_XPRHELPER_H 12 #define EIGEN_XPRHELPER_H 17 #if EIGEN_COMP_GNUC && !EIGEN_GNUC_AT(4,3) 18 #define EIGEN_EMPTY_STRUCT_CTOR(X) \ 19 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE X() {} \ 20 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE X(const X& ) {} 22 #define EIGEN_EMPTY_STRUCT_CTOR(X) 29 template<
typename IndexDest,
typename IndexSrc>
34 return IndexDest(idx);
41 #if EIGEN_HAS_TYPE_TRAITS 53 template<
typename RowIndices,
typename ColIndices>
67 template<
typename ExprScalar,
typename T,
bool IsSupported>
70 template<
typename S,
typename T>
77 template<
typename ExprScalar,
typename T,
typename PromotedType,
83 template<
typename S,
typename T>
87 template<
typename S,
typename T,
typename PromotedType>
95 template<
typename ExprScalar,
typename T,
typename PromotedType>
101 template<
typename S,
typename T,
typename PromotedType,
bool ConvertibleToLiteral>
105 template<
typename S,
typename T>
119 template<
typename I1,
typename I2>
137 operator T()
const {
return T(Value); }
180 PacketAccess =
false,
193 template<
int Size,
typename PacketType>
199 template<
int Size,
typename PacketType>
205 template<
typename T,
int Size>
211 #if EIGEN_MAX_STATIC_ALIGN_BYTES>0 212 template<
int ArrayBytes,
int AlignmentBytes,
213 bool Match = bool((ArrayBytes%AlignmentBytes)==0),
220 template<
int ArrayBytes,
int AlignmentBytes,
bool TryHalf>
223 enum {
value = AlignmentBytes };
226 template<
int ArrayBytes,
int AlignmentBytes>
235 template<
int ArrayBytes,
int AlignmentBytes>
250 template<
typename _Scalar,
int _Rows,
int _Cols,
255 int _MaxRows = _Rows,
260 IsColVector = _Cols==1 && _Rows!=1,
261 IsRowVector = _Rows==1 && _Cols!=1,
270 template<
typename Scalar,
int Rows,
int Cols,
int Options,
int MaxRows,
int MaxCols>
295 template<typename T, typename StorageKind = typename traits<T>::StorageKind>
struct plain_matrix_type;
303 typedef typename T::PlainObject
type;
332 template<typename T, typename StorageKind = typename traits<T>::StorageKind>
struct eval;
353 template<
typename _Scalar,
int _Rows,
int _Cols,
int _Options,
int _MaxRows,
int _MaxCols>
359 template<
typename _Scalar,
int _Rows,
int _Cols,
int _Options,
int _MaxRows,
int _MaxCols>
367 template<typename T, typename StorageKind = typename traits<T>::StorageKind>
struct plain_object_eval;
415 template <
typename T>
432 template<
typename T1,
typename T2>
467 CostEval = (NAsInteger+1) * ScalarReadCost + CoeffReadCost,
468 CostNoEval = NAsInteger * CoeffReadCost,
479 return const_cast<T*
>(ptr);
482 template<typename Derived, typename XprKind = typename traits<Derived>::XprKind>
488 template<
typename Derived>
494 template<
typename Derived>
500 template<typename Derived, typename XprKind = typename traits<Derived>::XprKind,
typename StorageKind =
typename traits<Derived>::StorageKind>
503 template<
typename Derived,
typename XprKind>
598 template<
typename ExpressionType,
typename Scalar =
typename ExpressionType::Scalar>
601 typedef Matrix<
Scalar, 1, ExpressionType::ColsAtCompileTime,
603 typedef Array<
Scalar, 1, ExpressionType::ColsAtCompileTime,
613 template<
typename ExpressionType,
typename Scalar =
typename ExpressionType::Scalar>
616 typedef Matrix<
Scalar, ExpressionType::RowsAtCompileTime, 1,
618 typedef Array<
Scalar, ExpressionType::RowsAtCompileTime, 1,
628 template<
typename ExpressionType,
typename Scalar =
typename ExpressionType::Scalar>
644 template<
typename Expr,
typename Scalar =
typename Expr::Scalar>
658 template<
typename ExpressionType>
666 {
enum {
ret =
false }; };
688 template<
typename T1,
typename T2>
693 template<
typename T1,
typename T2>
697 return (mat1.data()==mat2.data()) && (mat1.innerStride()==mat2.innerStride()) && (mat1.outerStride()==mat2.outerStride());
700 template<
typename T1,
typename T2>
709 template<
typename T,
bool Vectorized=false,
typename EnableIf =
void>
714 template<
typename T,
bool Vectorized>
723 template<
bool Vectorized>
725 template<
bool Vectorized>
729 #ifdef EIGEN_DEBUG_ASSIGN 730 std::string demangle_traversal(
int t)
739 std::string demangle_unrolling(
int t)
746 std::string demangle_flags(
int f)
800 template<
typename ScalarA,
typename ScalarB,
typename BinaryOp=
internal::scalar_product_op<ScalarA,ScalarB> >
802 #ifndef EIGEN_PARSED_BY_DOXYGEN
805 #endif // EIGEN_PARSED_BY_DOXYGEN 808 template<
typename T,
typename BinaryOp>
814 template <
typename T,
typename BinaryOp>
819 template <
typename T,
typename BinaryOp>
826 template<
typename T,
typename BinaryOp>
833 template<
typename T,
typename BinaryOp>
840 template<
typename BinaryOp>
850 #define EIGEN_CHECK_BINARY_COMPATIBILIY(BINOP,LHS,RHS) \ 851 EIGEN_STATIC_ASSERT((Eigen::internal::has_ReturnType<ScalarBinaryOpTraits<LHS, RHS,BINOP> >::value), \ 852 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) 856 #endif // EIGEN_XPRHELPER_H find_best_packet_helper< Size, typename packet_traits< T >::type >::type type
Generic expression of a matrix where all coefficients are defined by a functor.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T value)
Matrix< Scalar, ExpressionType::RowsAtCompileTime, 1, ExpressionType::PlainObject::Options &~RowMajor, ExpressionType::MaxRowsAtCompileTime, 1 > MatrixColType
#define EIGEN_STRONG_INLINE
ArrayBase< Derived > type
conditional< bool(traits< T >::Flags &NestByRefBit), T const &, const T >::type type
#define EIGEN_EMPTY_STRUCT_CTOR(X)
conditional< bool(traits< T >::Flags &NestByRefBit), T &, T >::type non_const_type
plain_matrix_type< T >::type type
EIGEN_DEVICE_FUNC T * const_cast_ptr(const T *ptr)
Array< Scalar, traits< Expr >::RowsAtCompileTime, traits< Expr >::ColsAtCompileTime, Options, traits< Expr >::MaxRowsAtCompileTime, traits< Expr >::MaxColsAtCompileTime > array_type
remove_all< CastType >::type _CastType
const unsigned int DirectAccessBit
dense_xpr_base< Derived, XprKind >::type type
const Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & type
const unsigned int LvalueBit
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T value)
plain_matrix_type_dense< T, typename traits< T >::XprKind, traits< T >::Flags >::type type
Represents a diagonal matrix with its storage.
conditional< bool(internal::is_const< T1 >::value), typename internal::add_const_on_value_type< T2 >::type, T2 >::type type
Namespace containing all symbols from the Eigen library.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
static const Pose3 T2(Rot3::Rodrigues(0.3, 0.2, 0.1), P2)
MatrixXd mat1(size, size)
EIGEN_DEVICE_FUNC IndexDest convert_index(const IndexSrc &idx)
#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS)
find_best_packet_helper< Size, typename unpacket_traits< PacketType >::half >::type type
const unsigned int RowMajorBit
#define EIGEN_SIZE_MIN_PREFER_FIXED(a, b)
const unsigned int PacketAccessBit
plain_matrix_type_dense< T, typename traits< T >::XprKind, evaluator< T >::Flags >::type type
Matrix< Scalar, 1, ExpressionType::ColsAtCompileTime, int(ExpressionType::PlainObject::Options)|int(RowMajor), 1, ExpressionType::MaxColsAtCompileTime > MatrixRowType
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T value() const
conditional< is_same< typename traits< ExpressionType >::XprKind, MatrixXpr >::value, MatrixRowType, ArrayRowType >::type type
Generic expression where a coefficient-wise binary operator is applied to two expressions.
CwiseNullaryOp< scalar_constant_op< Scalar >, const typename conditional< is_same< typename traits< Expr >::XprKind, MatrixXpr >::value, matrix_type, array_type >::type > type
EIGEN_DEVICE_FUNC variable_if_dynamicindex()
Matrix< Scalar, traits< Expr >::RowsAtCompileTime, traits< Expr >::ColsAtCompileTime, Options, traits< Expr >::MaxRowsAtCompileTime, traits< Expr >::MaxColsAtCompileTime > matrix_type
Array< int, Dynamic, 1 > v
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T value()
Eigen::Triplet< double > T
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Array< Scalar, diag_size, 1, ExpressionType::PlainObject::Options &~RowMajor, max_diag_size, 1 > ArrayDiagType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T v) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE variable_if_dynamic(T value=0) EIGEN_NO_THROW
EIGEN_DEVICE_FUNC bool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if< possibly_same_dense< T1, T2 >::value >::type *=0)
Base class for all 1D and 2D array, and related expressions.
Array< Scalar, 1, ExpressionType::ColsAtCompileTime, int(ExpressionType::PlainObject::Options)|int(RowMajor), 1, ExpressionType::MaxColsAtCompileTime > ArrayRowType
const Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & type
Matrix< _Scalar, _Rows, _Cols, Options, _MaxRows, _MaxCols > type
const unsigned int NestByRefBit
#define EIGEN_DEVICE_FUNC
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T value()
_CastType::Scalar NewScalarType
mp::number< mp::cpp_dec_float< 100 >, mp::et_on > Real
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE variable_if_dynamicindex(T value)
static const Similarity3 T1(R, Point3(3.5, -8.2, 4.2), 1)
#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived)
conditional< is_same< CurrentScalarType, NewScalarType >::value, const XprType &, CastType >::type type
plain_matrix_type< T >::type type
EIGEN_DEVICE_FUNC T EIGEN_STRONG_INLINE value() const
General-purpose arrays with easy API for coefficient-wise operations.
conditional< is_same< typename traits< ExpressionType >::XprKind, MatrixXpr >::value, MatrixDiagType, ArrayDiagType >::type type
Expression of a diagonal matrix.
conditional< Evaluate, PlainObject, typename ref_selector< T >::type >::type type
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
const unsigned int EvalBeforeNestingBit
#define eigen_internal_assert(x)
Generic expression where a coefficient-wise unary operator is applied to an expression.
The matrix class, also used for vectors and row-vectors.
conditional< is_same< typename traits< ExpressionType >::XprKind, MatrixXpr >::value, MatrixColType, ArrayColType >::type type
#define EIGEN_SIZE_MIN_PREFER_DYNAMIC(a, b)
Matrix< Scalar, diag_size, 1, ExpressionType::PlainObject::Options &~RowMajor, max_diag_size, 1 > MatrixDiagType
XprType::Scalar CurrentScalarType
Base class for all dense matrices, vectors, and expressions.
const unsigned int LinearAccessBit
#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION
Array< Scalar, ExpressionType::RowsAtCompileTime, 1, ExpressionType::PlainObject::Options &~RowMajor, ExpressionType::MaxRowsAtCompileTime, 1 > ArrayColType
MatrixBase< Derived > type
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T)
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
const unsigned int NoPreferredStorageOrderBit