XprHelper.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>
5 // Copyright (C) 2006-2008 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_XPRHELPER_H
12 #define EIGEN_XPRHELPER_H
13 
14 // just a workaround because GCC seems to not really like empty structs
15 // FIXME: gcc 4.3 generates bad code when strict-aliasing is enabled
16 // so currently we simply disable this optimization for gcc 4.3
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& ) {}
21 #else
22  #define EIGEN_EMPTY_STRUCT_CTOR(X)
23 #endif
24 
25 namespace Eigen {
26 
27 namespace internal {
28 
29 template<typename IndexDest, typename IndexSrc>
31 inline IndexDest convert_index(const IndexSrc& idx) {
32  // for sizeof(IndexDest)>=sizeof(IndexSrc) compilers should be able to optimize this away:
33  eigen_internal_assert(idx <= NumTraits<IndexDest>::highest() && "Index value to big for target type");
34  return IndexDest(idx);
35 }
36 
37 // true if T can be considered as an integral index (i.e., and integral type or enum)
38 template<typename T> struct is_valid_index_type
39 {
40  enum { value =
41 #if EIGEN_HAS_TYPE_TRAITS
43 #elif EIGEN_COMP_MSVC
45 #else
46  // without C++11, we use is_convertible to Index instead of is_integral in order to treat enums as Index.
48 #endif
49  };
50 };
51 
52 // true if both types are not valid index types
53 template<typename RowIndices, typename ColIndices>
56 };
57 
58 // promote_scalar_arg is an helper used in operation between an expression and a scalar, like:
59 // expression * scalar
60 // Its role is to determine how the type T of the scalar operand should be promoted given the scalar type ExprScalar of the given expression.
61 // The IsSupported template parameter must be provided by the caller as: internal::has_ReturnType<ScalarBinaryOpTraits<ExprScalar,T,op> >::value using the proper order for ExprScalar and T.
62 // Then the logic is as follows:
63 // - if the operation is natively supported as defined by IsSupported, then the scalar type is not promoted, and T is returned.
64 // - otherwise, NumTraits<ExprScalar>::Literal is returned if T is implicitly convertible to NumTraits<ExprScalar>::Literal AND that this does not imply a float to integer conversion.
65 // - otherwise, ExprScalar is returned if T is implicitly convertible to ExprScalar AND that this does not imply a float to integer conversion.
66 // - In all other cases, the promoted type is not defined, and the respective operation is thus invalid and not available (SFINAE).
67 template<typename ExprScalar,typename T, bool IsSupported>
69 
70 template<typename S,typename T>
71 struct promote_scalar_arg<S,T,true>
72 {
73  typedef T type;
74 };
75 
76 // Recursively check safe conversion to PromotedType, and then ExprScalar if they are different.
77 template<typename ExprScalar,typename T,typename PromotedType,
78  bool ConvertibleToLiteral = internal::is_convertible<T,PromotedType>::value,
81 
82 // Start recursion with NumTraits<ExprScalar>::Literal
83 template<typename S,typename T>
84 struct promote_scalar_arg<S,T,false> : promote_scalar_arg_unsupported<S,T,typename NumTraits<S>::Literal> {};
85 
86 // We found a match!
87 template<typename S,typename T, typename PromotedType>
88 struct promote_scalar_arg_unsupported<S,T,PromotedType,true,true>
89 {
90  typedef PromotedType type;
91 };
92 
93 // No match, but no real-to-integer issues, and ExprScalar and current PromotedType are different,
94 // so let's try to promote to ExprScalar
95 template<typename ExprScalar,typename T, typename PromotedType>
96 struct promote_scalar_arg_unsupported<ExprScalar,T,PromotedType,false,true>
97  : promote_scalar_arg_unsupported<ExprScalar,T,ExprScalar>
98 {};
99 
100 // Unsafe real-to-integer, let's stop.
101 template<typename S,typename T, typename PromotedType, bool ConvertibleToLiteral>
102 struct promote_scalar_arg_unsupported<S,T,PromotedType,ConvertibleToLiteral,false> {};
103 
104 // T is not even convertible to ExprScalar, let's stop.
105 template<typename S,typename T>
106 struct promote_scalar_arg_unsupported<S,T,S,false,true> {};
107 
108 //classes inheriting no_assignment_operator don't generate a default operator=.
110 {
111  private:
113  protected:
116 };
117 
119 template<typename I1, typename I2>
121 {
122  typedef typename conditional<(sizeof(I1)<sizeof(I2)), I2, I1>::type type;
123 };
124 
129 template<typename T, int Value> class variable_if_dynamic
130 {
131  public:
135  T value() { return T(Value); }
137  operator T() const { return T(Value); }
139  void setValue(T v) const { EIGEN_ONLY_USED_FOR_DEBUG(v); eigen_assert(v == T(Value)); }
140 };
141 
142 template<typename T> class variable_if_dynamic<T, Dynamic>
143 {
145  public:
147  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T value() const { return m_value; }
148  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE operator T() const { return m_value; }
150 };
151 
154 template<typename T, int Value> class variable_if_dynamicindex
155 {
156  public:
160  T value() { return T(Value); }
162  void setValue(T) {}
163 };
164 
165 template<typename T> class variable_if_dynamicindex<T, DynamicIndex>
166 {
169  public:
171  EIGEN_DEVICE_FUNC T EIGEN_STRONG_INLINE value() const { return m_value; }
173 };
174 
175 template<typename T> struct functor_traits
176 {
177  enum
178  {
179  Cost = 10,
180  PacketAccess = false,
181  IsRepeatable = false
182  };
183 };
184 
185 template<typename T> struct packet_traits;
186 
187 template<typename T> struct unpacket_traits;
188 
189 template<int Size, typename PacketType,
190  bool Stop = Size==Dynamic || (Size%unpacket_traits<PacketType>::size)==0 || is_same<PacketType,typename unpacket_traits<PacketType>::half>::value>
192 
193 template< int Size, typename PacketType>
195 {
196  typedef PacketType type;
197 };
198 
199 template<int Size, typename PacketType>
201 {
203 };
204 
205 template<typename T, int Size>
207 {
209 };
210 
211 #if EIGEN_MAX_STATIC_ALIGN_BYTES>0
212 template<int ArrayBytes, int AlignmentBytes,
213  bool Match = bool((ArrayBytes%AlignmentBytes)==0),
214  bool TryHalf = bool(EIGEN_MIN_ALIGN_BYTES<AlignmentBytes) >
216 {
217  enum { value = 0 };
218 };
219 
220 template<int ArrayBytes, int AlignmentBytes, bool TryHalf>
221 struct compute_default_alignment_helper<ArrayBytes, AlignmentBytes, true, TryHalf> // Match
222 {
223  enum { value = AlignmentBytes };
224 };
225 
226 template<int ArrayBytes, int AlignmentBytes>
227 struct compute_default_alignment_helper<ArrayBytes, AlignmentBytes, false, true> // Try-half
228 {
229  // current packet too large, try with an half-packet
230  enum { value = compute_default_alignment_helper<ArrayBytes, AlignmentBytes/2>::value };
231 };
232 #else
233 // If static alignment is disabled, no need to bother.
234 // This also avoids a division by zero in "bool Match = bool((ArrayBytes%AlignmentBytes)==0)"
235 template<int ArrayBytes, int AlignmentBytes>
237 {
238  enum { value = 0 };
239 };
240 #endif
241 
242 template<typename T, int Size> struct compute_default_alignment {
244 };
245 
246 template<typename T> struct compute_default_alignment<T,Dynamic> {
248 };
249 
250 template<typename _Scalar, int _Rows, int _Cols,
251  int _Options = AutoAlign |
252  ( (_Rows==1 && _Cols!=1) ? RowMajor
253  : (_Cols==1 && _Rows!=1) ? ColMajor
255  int _MaxRows = _Rows,
256  int _MaxCols = _Cols
258 {
259  enum {
260  IsColVector = _Cols==1 && _Rows!=1,
261  IsRowVector = _Rows==1 && _Cols!=1,
262  Options = IsColVector ? (_Options | ColMajor) & ~RowMajor
263  : IsRowVector ? (_Options | RowMajor) & ~ColMajor
264  : _Options
265  };
266  public:
268 };
269 
270 template<typename Scalar, int Rows, int Cols, int Options, int MaxRows, int MaxCols>
272 {
273  enum { row_major_bit = Options&RowMajor ? RowMajorBit : 0 };
274  public:
275  // FIXME currently we still have to handle DirectAccessBit at the expression level to handle DenseCoeffsBase<>
276  // and then propagate this information to the evaluator's flags.
277  // However, I (Gael) think that DirectAccessBit should only matter at the evaluation stage.
278  enum { ret = DirectAccessBit | LvalueBit | NestByRefBit | row_major_bit };
279 };
280 
281 template<int _Rows, int _Cols> struct size_at_compile_time
282 {
283  enum { ret = (_Rows==Dynamic || _Cols==Dynamic) ? Dynamic : _Rows * _Cols };
284 };
285 
286 template<typename XprType> struct size_of_xpr_at_compile_time
287 {
289 };
290 
291 /* plain_matrix_type : the difference from eval is that plain_matrix_type is always a plain matrix type,
292  * whereas eval is a const reference in the case of a matrix
293  */
294 
295 template<typename T, typename StorageKind = typename traits<T>::StorageKind> struct plain_matrix_type;
296 template<typename T, typename BaseClassType, int Flags> struct plain_matrix_type_dense;
297 template<typename T> struct plain_matrix_type<T,Dense>
298 {
300 };
301 template<typename T> struct plain_matrix_type<T,DiagonalShape>
302 {
303  typedef typename T::PlainObject type;
304 };
305 
306 template<typename T, int Flags> struct plain_matrix_type_dense<T,MatrixXpr,Flags>
307 {
311  AutoAlign | (Flags&RowMajorBit ? RowMajor : ColMajor),
314  > type;
315 };
316 
317 template<typename T, int Flags> struct plain_matrix_type_dense<T,ArrayXpr,Flags>
318 {
322  AutoAlign | (Flags&RowMajorBit ? RowMajor : ColMajor),
325  > type;
326 };
327 
328 /* eval : the return type of eval(). For matrices, this is just a const reference
329  * in order to avoid a useless copy
330  */
331 
332 template<typename T, typename StorageKind = typename traits<T>::StorageKind> struct eval;
333 
334 template<typename T> struct eval<T,Dense>
335 {
337 // typedef typename T::PlainObject type;
338 // typedef T::Matrix<typename traits<T>::Scalar,
339 // traits<T>::RowsAtCompileTime,
340 // traits<T>::ColsAtCompileTime,
341 // AutoAlign | (traits<T>::Flags&RowMajorBit ? RowMajor : ColMajor),
342 // traits<T>::MaxRowsAtCompileTime,
343 // traits<T>::MaxColsAtCompileTime
344 // > type;
345 };
346 
347 template<typename T> struct eval<T,DiagonalShape>
348 {
350 };
351 
352 // for matrices, no need to evaluate, just use a const reference to avoid a useless copy
353 template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
354 struct eval<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>, Dense>
355 {
357 };
358 
359 template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
360 struct eval<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>, Dense>
361 {
363 };
364 
365 
366 /* similar to plain_matrix_type, but using the evaluator's Flags */
367 template<typename T, typename StorageKind = typename traits<T>::StorageKind> struct plain_object_eval;
368 
369 template<typename T>
371 {
373 };
374 
375 
376 /* plain_matrix_type_column_major : same as plain_matrix_type but guaranteed to be column-major
377  */
378 template<typename T> struct plain_matrix_type_column_major
379 {
384  };
386  Rows,
387  Cols,
388  (MaxRows==1&&MaxCols!=1) ? RowMajor : ColMajor,
389  MaxRows,
390  MaxCols
391  > type;
392 };
393 
394 /* plain_matrix_type_row_major : same as plain_matrix_type but guaranteed to be row-major
395  */
396 template<typename T> struct plain_matrix_type_row_major
397 {
402  };
404  Rows,
405  Cols,
406  (MaxCols==1&&MaxRows!=1) ? ColMajor : RowMajor,
407  MaxRows,
408  MaxCols
409  > type;
410 };
411 
415 template <typename T>
417 {
418  typedef typename conditional<
420  T const&,
421  const T
423 
424  typedef typename conditional<
426  T &,
427  T
429 };
430 
432 template<typename T1, typename T2>
434 {
435  typedef typename conditional<
438  T2
440 };
441 
442 
443 // However, we still need a mechanism to detect whether an expression which is evaluated multiple time
444 // has to be evaluated into a temporary.
445 // That's the purpose of this new nested_eval helper:
458 {
459  enum {
461  CoeffReadCost = evaluator<T>::CoeffReadCost, // NOTE What if an evaluator evaluate itself into a temporary?
462  // Then CoeffReadCost will be small (e.g., 1) but we still have to evaluate, especially if n>1.
463  // This situation is already taken care by the EvalBeforeNestingBit flag, which is turned ON
464  // for all evaluator creating a temporary. This flag is then propagated by the parent evaluators.
465  // Another solution could be to count the number of temps?
470  };
471 
473 };
474 
475 template<typename T>
477 inline T* const_cast_ptr(const T* ptr)
478 {
479  return const_cast<T*>(ptr);
480 }
481 
482 template<typename Derived, typename XprKind = typename traits<Derived>::XprKind>
484 {
485  /* dense_xpr_base should only ever be used on dense expressions, thus falling either into the MatrixXpr or into the ArrayXpr cases */
486 };
487 
488 template<typename Derived>
489 struct dense_xpr_base<Derived, MatrixXpr>
490 {
492 };
493 
494 template<typename Derived>
495 struct dense_xpr_base<Derived, ArrayXpr>
496 {
498 };
499 
500 template<typename Derived, typename XprKind = typename traits<Derived>::XprKind, typename StorageKind = typename traits<Derived>::StorageKind>
502 
503 template<typename Derived, typename XprKind>
504 struct generic_xpr_base<Derived, XprKind, Dense>
505 {
507 };
508 
509 template<typename XprType, typename CastType> struct cast_return_type
510 {
515  const XprType&,CastType>::type type;
516 };
517 
518 template <typename A, typename B> struct promote_storage_type;
519 
520 template <typename A> struct promote_storage_type<A,A>
521 {
522  typedef A ret;
523 };
524 template <typename A> struct promote_storage_type<A, const A>
525 {
526  typedef A ret;
527 };
528 template <typename A> struct promote_storage_type<const A, A>
529 {
530  typedef A ret;
531 };
532 
546 template <typename A, typename B, typename Functor> struct cwise_promote_storage_type;
547 
548 template <typename A, typename Functor> struct cwise_promote_storage_type<A,A,Functor> { typedef A ret; };
549 template <typename Functor> struct cwise_promote_storage_type<Dense,Dense,Functor> { typedef Dense ret; };
550 template <typename A, typename Functor> struct cwise_promote_storage_type<A,Dense,Functor> { typedef Dense ret; };
551 template <typename B, typename Functor> struct cwise_promote_storage_type<Dense,B,Functor> { typedef Dense ret; };
552 template <typename Functor> struct cwise_promote_storage_type<Sparse,Dense,Functor> { typedef Sparse ret; };
553 template <typename Functor> struct cwise_promote_storage_type<Dense,Sparse,Functor> { typedef Sparse ret; };
554 
555 template <typename LhsKind, typename RhsKind, int LhsOrder, int RhsOrder> struct cwise_promote_storage_order {
556  enum { value = LhsOrder };
557 };
558 
559 template <typename LhsKind, int LhsOrder, int RhsOrder> struct cwise_promote_storage_order<LhsKind,Sparse,LhsOrder,RhsOrder> { enum { value = RhsOrder }; };
560 template <typename RhsKind, int LhsOrder, int RhsOrder> struct cwise_promote_storage_order<Sparse,RhsKind,LhsOrder,RhsOrder> { enum { value = LhsOrder }; };
561 template <int Order> struct cwise_promote_storage_order<Sparse,Sparse,Order,Order> { enum { value = Order }; };
562 
563 
578 template <typename A, typename B, int ProductTag> struct product_promote_storage_type;
579 
580 template <typename A, int ProductTag> struct product_promote_storage_type<A, A, ProductTag> { typedef A ret;};
581 template <int ProductTag> struct product_promote_storage_type<Dense, Dense, ProductTag> { typedef Dense ret;};
582 template <typename A, int ProductTag> struct product_promote_storage_type<A, Dense, ProductTag> { typedef Dense ret; };
583 template <typename B, int ProductTag> struct product_promote_storage_type<Dense, B, ProductTag> { typedef Dense ret; };
584 
585 template <typename A, int ProductTag> struct product_promote_storage_type<A, DiagonalShape, ProductTag> { typedef A ret; };
586 template <typename B, int ProductTag> struct product_promote_storage_type<DiagonalShape, B, ProductTag> { typedef B ret; };
587 template <int ProductTag> struct product_promote_storage_type<Dense, DiagonalShape, ProductTag> { typedef Dense ret; };
588 template <int ProductTag> struct product_promote_storage_type<DiagonalShape, Dense, ProductTag> { typedef Dense ret; };
589 
590 template <typename A, int ProductTag> struct product_promote_storage_type<A, PermutationStorage, ProductTag> { typedef A ret; };
591 template <typename B, int ProductTag> struct product_promote_storage_type<PermutationStorage, B, ProductTag> { typedef B ret; };
592 template <int ProductTag> struct product_promote_storage_type<Dense, PermutationStorage, ProductTag> { typedef Dense ret; };
593 template <int ProductTag> struct product_promote_storage_type<PermutationStorage, Dense, ProductTag> { typedef Dense ret; };
594 
598 template<typename ExpressionType, typename Scalar = typename ExpressionType::Scalar>
600 {
601  typedef Matrix<Scalar, 1, ExpressionType::ColsAtCompileTime,
602  int(ExpressionType::PlainObject::Options) | int(RowMajor), 1, ExpressionType::MaxColsAtCompileTime> MatrixRowType;
603  typedef Array<Scalar, 1, ExpressionType::ColsAtCompileTime,
604  int(ExpressionType::PlainObject::Options) | int(RowMajor), 1, ExpressionType::MaxColsAtCompileTime> ArrayRowType;
605 
606  typedef typename conditional<
611 };
612 
613 template<typename ExpressionType, typename Scalar = typename ExpressionType::Scalar>
615 {
616  typedef Matrix<Scalar, ExpressionType::RowsAtCompileTime, 1,
617  ExpressionType::PlainObject::Options & ~RowMajor, ExpressionType::MaxRowsAtCompileTime, 1> MatrixColType;
618  typedef Array<Scalar, ExpressionType::RowsAtCompileTime, 1,
619  ExpressionType::PlainObject::Options & ~RowMajor, ExpressionType::MaxRowsAtCompileTime, 1> ArrayColType;
620 
621  typedef typename conditional<
626 };
627 
628 template<typename ExpressionType, typename Scalar = typename ExpressionType::Scalar>
630 {
631  enum { diag_size = EIGEN_SIZE_MIN_PREFER_DYNAMIC(ExpressionType::RowsAtCompileTime, ExpressionType::ColsAtCompileTime),
632  max_diag_size = EIGEN_SIZE_MIN_PREFER_FIXED(ExpressionType::MaxRowsAtCompileTime, ExpressionType::MaxColsAtCompileTime)
633  };
636 
637  typedef typename conditional<
642 };
643 
644 template<typename Expr,typename Scalar = typename Expr::Scalar>
646 {
648 
651 
654 
656 };
657 
658 template<typename ExpressionType>
659 struct is_lvalue
660 {
663 };
664 
665 template<typename T> struct is_diagonal
666 { enum { ret = false }; };
667 
668 template<typename T> struct is_diagonal<DiagonalBase<T> >
669 { enum { ret = true }; };
670 
671 template<typename T> struct is_diagonal<DiagonalWrapper<T> >
672 { enum { ret = true }; };
673 
674 template<typename T, int S> struct is_diagonal<DiagonalMatrix<T,S> >
675 { enum { ret = true }; };
676 
677 
678 template<typename T> struct is_identity
679 { enum { value = false }; };
680 
681 template<typename T> struct is_identity<CwiseNullaryOp<internal::scalar_identity_op<typename T::Scalar>, T> >
682 { enum { value = true }; };
683 
684 
685 template<typename S1, typename S2> struct glue_shapes;
687 
688 template<typename T1, typename T2>
691 };
692 
693 template<typename T1, typename T2>
695 bool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if<possibly_same_dense<T1,T2>::value>::type * = 0)
696 {
697  return (mat1.data()==mat2.data()) && (mat1.innerStride()==mat2.innerStride()) && (mat1.outerStride()==mat2.outerStride());
698 }
699 
700 template<typename T1, typename T2>
702 bool is_same_dense(const T1 &, const T2 &, typename enable_if<!possibly_same_dense<T1,T2>::value>::type * = 0)
703 {
704  return false;
705 }
706 
707 // Internal helper defining the cost of a scalar division for the type T.
708 // The default heuristic can be specialized for each scalar type and architecture.
709 template<typename T,bool Vectorized=false,typename EnableIf = void>
712 };
713 
714 template<typename T,bool Vectorized>
715 struct scalar_div_cost<std::complex<T>, Vectorized> {
719  };
720 };
721 
722 
723 template<bool Vectorized>
724 struct scalar_div_cost<signed long,Vectorized,typename conditional<sizeof(long)==8,void,false_type>::type> { enum { value = 24 }; };
725 template<bool Vectorized>
726 struct scalar_div_cost<unsigned long,Vectorized,typename conditional<sizeof(long)==8,void,false_type>::type> { enum { value = 21 }; };
727 
728 
729 #ifdef EIGEN_DEBUG_ASSIGN
730 std::string demangle_traversal(int t)
731 {
732  if(t==DefaultTraversal) return "DefaultTraversal";
733  if(t==LinearTraversal) return "LinearTraversal";
734  if(t==InnerVectorizedTraversal) return "InnerVectorizedTraversal";
735  if(t==LinearVectorizedTraversal) return "LinearVectorizedTraversal";
736  if(t==SliceVectorizedTraversal) return "SliceVectorizedTraversal";
737  return "?";
738 }
739 std::string demangle_unrolling(int t)
740 {
741  if(t==NoUnrolling) return "NoUnrolling";
742  if(t==InnerUnrolling) return "InnerUnrolling";
743  if(t==CompleteUnrolling) return "CompleteUnrolling";
744  return "?";
745 }
746 std::string demangle_flags(int f)
747 {
748  std::string res;
749  if(f&RowMajorBit) res += " | RowMajor";
750  if(f&PacketAccessBit) res += " | Packet";
751  if(f&LinearAccessBit) res += " | Linear";
752  if(f&LvalueBit) res += " | Lvalue";
753  if(f&DirectAccessBit) res += " | Direct";
754  if(f&NestByRefBit) res += " | NestByRef";
755  if(f&NoPreferredStorageOrderBit) res += " | NoPreferredStorageOrderBit";
756 
757  return res;
758 }
759 #endif
760 
761 } // end namespace internal
762 
763 
800 template<typename ScalarA, typename ScalarB, typename BinaryOp=internal::scalar_product_op<ScalarA,ScalarB> >
802 #ifndef EIGEN_PARSED_BY_DOXYGEN
803  // for backward compatibility, use the hints given by the (deprecated) internal::scalar_product_traits class.
804  : internal::scalar_product_traits<ScalarA,ScalarB>
805 #endif // EIGEN_PARSED_BY_DOXYGEN
806 {};
807 
808 template<typename T, typename BinaryOp>
809 struct ScalarBinaryOpTraits<T,T,BinaryOp>
810 {
811  typedef T ReturnType;
812 };
813 
814 template <typename T, typename BinaryOp>
815 struct ScalarBinaryOpTraits<T, typename NumTraits<typename internal::enable_if<NumTraits<T>::IsComplex,T>::type>::Real, BinaryOp>
816 {
817  typedef T ReturnType;
818 };
819 template <typename T, typename BinaryOp>
820 struct ScalarBinaryOpTraits<typename NumTraits<typename internal::enable_if<NumTraits<T>::IsComplex,T>::type>::Real, T, BinaryOp>
821 {
822  typedef T ReturnType;
823 };
824 
825 // For Matrix * Permutation
826 template<typename T, typename BinaryOp>
827 struct ScalarBinaryOpTraits<T,void,BinaryOp>
828 {
829  typedef T ReturnType;
830 };
831 
832 // For Permutation * Matrix
833 template<typename T, typename BinaryOp>
834 struct ScalarBinaryOpTraits<void,T,BinaryOp>
835 {
836  typedef T ReturnType;
837 };
838 
839 // for Permutation*Permutation
840 template<typename BinaryOp>
841 struct ScalarBinaryOpTraits<void,void,BinaryOp>
842 {
843  typedef void ReturnType;
844 };
845 
846 // We require Lhs and Rhs to have "compatible" scalar types.
847 // It is tempting to always allow mixing different types but remember that this is often impossible in the vectorized paths.
848 // So allowing mixing different types gives very unexpected errors when enabling vectorization, when the user tries to
849 // add together a float matrix and a double matrix.
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)
853 
854 } // end namespace Eigen
855 
856 #endif // EIGEN_XPRHELPER_H
EIGEN_EMPTY_STRUCT_CTOR
#define EIGEN_EMPTY_STRUCT_CTOR(X)
Definition: XprHelper.h:22
gtsam.examples.DogLegOptimizerExample.int
int
Definition: DogLegOptimizerExample.py:111
Eigen::internal::nested_eval::CostNoEval
@ CostNoEval
Definition: XprHelper.h:468
Eigen::internal::variable_if_dynamic
Definition: XprHelper.h:129
Eigen::internal::nested_eval::Evaluate
@ Evaluate
Definition: XprHelper.h:469
Eigen::HugeCost
const int HugeCost
Definition: Constants.h:44
Eigen::internal::find_best_packet::type
find_best_packet_helper< Size, typename packet_traits< T >::type >::type type
Definition: XprHelper.h:208
Eigen::MatrixXpr
Definition: Constants.h:522
EIGEN_DEVICE_FUNC
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
Eigen::internal::is_diagonal
Definition: XprHelper.h:665
Eigen::internal::scalar_identity_op
Definition: NullaryFunctors.h:31
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Eigen::internal::cast_return_type
Definition: XprHelper.h:509
Eigen::internal::variable_if_dynamicindex< T, DynamicIndex >::variable_if_dynamicindex
EIGEN_DEVICE_FUNC variable_if_dynamicindex()
Definition: XprHelper.h:168
Eigen::internal::cast_return_type::NewScalarType
_CastType::Scalar NewScalarType
Definition: XprHelper.h:513
Eigen::DiagonalMatrix
Represents a diagonal matrix with its storage.
Definition: DiagonalMatrix.h:140
Eigen::ScalarBinaryOpTraits< T, typename NumTraits< typename internal::enable_if< NumTraits< T >::IsComplex, T >::type >::Real, BinaryOp >::ReturnType
T ReturnType
Definition: XprHelper.h:817
Eigen::internal::plain_diag_type::type
conditional< is_same< typename traits< ExpressionType >::XprKind, MatrixXpr >::value, MatrixDiagType, ArrayDiagType >::type type
Definition: XprHelper.h:641
gtsam.examples.DogLegOptimizerExample.type
type
Definition: DogLegOptimizerExample.py:111
Eigen::internal::plain_diag_type::ArrayDiagType
Array< Scalar, diag_size, 1, ExpressionType::PlainObject::Options &~RowMajor, max_diag_size, 1 > ArrayDiagType
Definition: XprHelper.h:635
Eigen::internal::possibly_same_dense
Definition: XprHelper.h:689
Eigen::CwiseBinaryOp
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition: CwiseBinaryOp.h:77
Eigen::DenseShape
Definition: Constants.h:528
EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR
#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived)
Definition: Macros.h:1247
Eigen::internal::transfer_constness::type
conditional< bool(internal::is_const< T1 >::value), typename internal::add_const_on_value_type< T2 >::type, T2 >::type type
Definition: XprHelper.h:439
Eigen::Sparse
Definition: Constants.h:510
mat1
MatrixXd mat1(size, size)
Eigen::internal::plain_constant_type::Options
@ Options
Definition: XprHelper.h:647
Eigen::internal::dense_xpr_base
Definition: XprHelper.h:483
Eigen::internal::promote_scalar_arg< S, T, true >::type
T type
Definition: XprHelper.h:73
Eigen::internal::variable_if_dynamicindex< T, DynamicIndex >::variable_if_dynamicindex
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE variable_if_dynamicindex(T value)
Definition: XprHelper.h:170
Eigen::DefaultTraversal
@ DefaultTraversal
Definition: Constants.h:277
eigen_assert
#define eigen_assert(x)
Definition: Macros.h:1037
Eigen::internal::cast_return_type::_CastType
remove_all< CastType >::type _CastType
Definition: XprHelper.h:512
Eigen::internal::possibly_same_dense::value
@ value
Definition: XprHelper.h:690
Eigen::internal::product_promote_storage_type< A, DiagonalShape, ProductTag >::ret
A ret
Definition: XprHelper.h:585
Eigen::internal::is_lvalue
Definition: XprHelper.h:659
Eigen::internal::dense_xpr_base< Derived, ArrayXpr >::type
ArrayBase< Derived > type
Definition: XprHelper.h:497
Eigen::RowMajorBit
const unsigned int RowMajorBit
Definition: Constants.h:66
Eigen::internal::nested_eval::type
conditional< Evaluate, PlainObject, typename ref_selector< T >::type >::type type
Definition: XprHelper.h:472
Eigen::internal::false_type
Definition: Meta.h:97
Eigen::internal::promote_scalar_arg
Definition: XprHelper.h:68
ret
DenseIndex ret
Definition: level1_cplx_impl.h:44
B
Definition: test_numpy_dtypes.cpp:299
Eigen::internal::variable_if_dynamic< T, Dynamic >::m_value
T m_value
Definition: XprHelper.h:144
Eigen::ScalarBinaryOpTraits< T, void, BinaryOp >::ReturnType
T ReturnType
Definition: XprHelper.h:829
Eigen::internal::product_promote_storage_type< PermutationStorage, Dense, ProductTag >::ret
Dense ret
Definition: XprHelper.h:593
EIGEN_CONSTEXPR
#define EIGEN_CONSTEXPR
Definition: Macros.h:787
Eigen::internal::find_best_packet_helper< Size, PacketType, true >::type
PacketType type
Definition: XprHelper.h:196
Eigen::internal::plain_object_eval
Definition: XprHelper.h:367
Eigen::Array
General-purpose arrays with easy API for coefficient-wise operations.
Definition: Array.h:45
Eigen::internal::variable_if_dynamicindex< T, DynamicIndex >::value
EIGEN_DEVICE_FUNC T EIGEN_STRONG_INLINE value() const
Definition: XprHelper.h:171
type
Definition: pytypes.h:1525
Eigen::internal::product_promote_storage_type< Dense, B, ProductTag >::ret
Dense ret
Definition: XprHelper.h:583
Eigen::internal::eval< T, DiagonalShape >::type
plain_matrix_type< T >::type type
Definition: XprHelper.h:349
T
Eigen::Triplet< double > T
Definition: Tutorial_sparse_example.cpp:6
Eigen::internal::glue_shapes
Definition: XprHelper.h:685
Eigen::CompleteUnrolling
@ CompleteUnrolling
Definition: Constants.h:304
Eigen::internal::plain_row_type
Definition: XprHelper.h:599
Eigen::ScalarBinaryOpTraits
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
Definition: XprHelper.h:801
Eigen::internal::nested_eval
Definition: XprHelper.h:457
Eigen::ScalarBinaryOpTraits< void, void, BinaryOp >::ReturnType
void ReturnType
Definition: XprHelper.h:843
Eigen::RowMajor
@ RowMajor
Definition: Constants.h:321
Eigen::internal::scalar_product_traits
Definition: Meta.h:738
res
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
Eigen::internal::cast_return_type::type
conditional< is_same< CurrentScalarType, NewScalarType >::value, const XprType &, CastType >::type type
Definition: XprHelper.h:515
Eigen::internal::plain_matrix_type
Definition: XprHelper.h:295
Eigen::internal::plain_matrix_type< T, DiagonalShape >::type
T::PlainObject type
Definition: XprHelper.h:303
Eigen::internal::plain_row_type::type
conditional< is_same< typename traits< ExpressionType >::XprKind, MatrixXpr >::value, MatrixRowType, ArrayRowType >::type type
Definition: XprHelper.h:610
Eigen::internal::promote_storage_type< A, A >::ret
A ret
Definition: XprHelper.h:522
Eigen::internal::plain_matrix_type_column_major::Cols
@ Cols
Definition: XprHelper.h:381
Eigen::internal::plain_matrix_type_column_major::MaxRows
@ MaxRows
Definition: XprHelper.h:382
Eigen::internal::ref_selector::type
conditional< bool(traits< T >::Flags &NestByRefBit), T const &, const T >::type type
Definition: XprHelper.h:422
eigen_internal_assert
#define eigen_internal_assert(x)
Definition: Macros.h:1043
Eigen::DirectAccessBit
const unsigned int DirectAccessBit
Definition: Constants.h:155
EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION
#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION
Definition: Macros.h:29
Eigen::internal::compute_matrix_flags
Definition: XprHelper.h:271
Eigen::internal::plain_constant_type::array_type
Array< Scalar, traits< Expr >::RowsAtCompileTime, traits< Expr >::ColsAtCompileTime, Options, traits< Expr >::MaxRowsAtCompileTime, traits< Expr >::MaxColsAtCompileTime > array_type
Definition: XprHelper.h:650
EIGEN_ONLY_USED_FOR_DEBUG
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
Definition: Macros.h:1049
EIGEN_MAX_STATIC_ALIGN_BYTES
#define EIGEN_MAX_STATIC_ALIGN_BYTES
Definition: ConfigureVectorization.h:128
Eigen::NoUnrolling
@ NoUnrolling
Definition: Constants.h:299
Eigen::internal::product_promote_storage_type< Dense, DiagonalShape, ProductTag >::ret
Dense ret
Definition: XprHelper.h:587
Eigen::CwiseNullaryOp
Generic expression of a matrix where all coefficients are defined by a functor.
Definition: CwiseNullaryOp.h:60
Eigen::internal::nested_eval::ScalarReadCost
@ ScalarReadCost
Definition: XprHelper.h:460
Eigen::PacketAccessBit
const unsigned int PacketAccessBit
Definition: Constants.h:94
Eigen::internal::size_of_xpr_at_compile_time
Definition: XprHelper.h:286
EIGEN_MIN_ALIGN_BYTES
#define EIGEN_MIN_ALIGN_BYTES
Definition: ConfigureVectorization.h:77
Eigen::ArrayXpr
Definition: Constants.h:525
n
int n
Definition: BiCGSTAB_simple.cpp:1
Eigen::internal::compute_default_alignment::value
@ value
Definition: XprHelper.h:243
Eigen::PacketType
Definition: TensorMeta.h:50
Eigen::internal::plain_diag_type::max_diag_size
@ max_diag_size
Definition: XprHelper.h:632
Eigen::internal::variable_if_dynamicindex::value
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T value()
Definition: XprHelper.h:160
Eigen::internal::is_convertible
Definition: Meta.h:257
Eigen::internal::true_type
Definition: Meta.h:96
Eigen::internal::variable_if_dynamicindex< T, DynamicIndex >::m_value
T m_value
Definition: XprHelper.h:167
Eigen::internal::plain_matrix_type_column_major
Definition: XprHelper.h:378
Eigen::InnerVectorizedTraversal
@ InnerVectorizedTraversal
Definition: Constants.h:282
Eigen::internal::is_valid_index_type
Definition: XprHelper.h:38
Eigen::internal::variable_if_dynamic< T, Dynamic >::value
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T value() const
Definition: XprHelper.h:147
Functor
Definition: NonLinearOptimization.cpp:117
Eigen::internal::unpacket_traits::size
@ size
Definition: GenericPacketMath.h:138
A
Definition: test_numpy_dtypes.cpp:298
Eigen::internal::unpacket_traits::half
T half
Definition: GenericPacketMath.h:135
Eigen::internal::eval< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, Dense >::type
const typedef Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & type
Definition: XprHelper.h:362
Eigen::internal::plain_matrix_type_row_major::Rows
@ Rows
Definition: XprHelper.h:398
Eigen::internal::plain_object_eval< T, Dense >::type
plain_matrix_type_dense< T, typename traits< T >::XprKind, evaluator< T >::Flags >::type type
Definition: XprHelper.h:372
Eigen::internal::ref_selector::non_const_type
conditional< bool(traits< T >::Flags &NestByRefBit), T &, T >::type non_const_type
Definition: XprHelper.h:428
Eigen::internal::plain_diag_type::MatrixDiagType
Matrix< Scalar, diag_size, 1, ExpressionType::PlainObject::Options &~RowMajor, max_diag_size, 1 > MatrixDiagType
Definition: XprHelper.h:634
Eigen::internal::product_promote_storage_type< Dense, Dense, ProductTag >::ret
Dense ret
Definition: XprHelper.h:581
Eigen::LvalueBit
const unsigned int LvalueBit
Definition: Constants.h:144
Eigen::internal::plain_row_type::MatrixRowType
Matrix< Scalar, 1, ExpressionType::ColsAtCompileTime, int(ExpressionType::PlainObject::Options)|int(RowMajor), 1, ExpressionType::MaxColsAtCompileTime > MatrixRowType
Definition: XprHelper.h:602
Eigen::internal::plain_row_type::ArrayRowType
Array< Scalar, 1, ExpressionType::ColsAtCompileTime, int(ExpressionType::PlainObject::Options)|int(RowMajor), 1, ExpressionType::MaxColsAtCompileTime > ArrayRowType
Definition: XprHelper.h:604
Eigen::internal::is_identity
Definition: XprHelper.h:678
Eigen::ScalarBinaryOpTraits< void, T, BinaryOp >::ReturnType
T ReturnType
Definition: XprHelper.h:836
Eigen::internal::is_valid_index_type::value
@ value
Definition: XprHelper.h:40
Eigen::Dynamic
const int Dynamic
Definition: Constants.h:22
Eigen::internal::cwise_promote_storage_type
Definition: XprHelper.h:546
Eigen::internal::variable_if_dynamic::value
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T value()
Definition: XprHelper.h:135
Eigen::internal::generic_xpr_base
Definition: XprHelper.h:501
Eigen::internal::glue_shapes< DenseShape, TriangularShape >::type
TriangularShape type
Definition: XprHelper.h:686
Eigen::internal::plain_constant_type
Definition: XprHelper.h:645
Eigen::internal::find_best_packet_helper< Size, PacketType, false >::type
find_best_packet_helper< Size, typename unpacket_traits< PacketType >::half >::type type
Definition: XprHelper.h:202
Eigen::internal::valid_indexed_view_overload
Definition: XprHelper.h:54
Eigen::internal::eval< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, Dense >::type
const typedef Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & type
Definition: XprHelper.h:356
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
Eigen::internal::scalar_div_cost::value
@ value
Definition: XprHelper.h:711
Eigen::internal::nested_eval::NAsInteger
@ NAsInteger
Definition: XprHelper.h:466
Eigen::internal::generic_xpr_base< Derived, XprKind, Dense >::type
dense_xpr_base< Derived, XprKind >::type type
Definition: XprHelper.h:506
Eigen::internal::plain_matrix_type< T, Dense >::type
plain_matrix_type_dense< T, typename traits< T >::XprKind, traits< T >::Flags >::type type
Definition: XprHelper.h:299
EIGEN_SIZE_MIN_PREFER_DYNAMIC
#define EIGEN_SIZE_MIN_PREFER_DYNAMIC(a, b)
Definition: Macros.h:1294
EIGEN_MAX_ALIGN_BYTES
#define EIGEN_MAX_ALIGN_BYTES
Definition: ConfigureVectorization.h:175
Eigen::internal::compute_default_alignment_helper::value
@ value
Definition: XprHelper.h:238
Eigen::InnerUnrolling
@ InnerUnrolling
Definition: Constants.h:301
Eigen::internal::cwise_promote_storage_type< A, Dense, Functor >::ret
Dense ret
Definition: XprHelper.h:550
Eigen::SliceVectorizedTraversal
@ SliceVectorizedTraversal
Definition: Constants.h:288
Eigen::internal::functor_traits::IsRepeatable
@ IsRepeatable
Definition: XprHelper.h:181
Eigen::internal::promote_scalar_arg_unsupported
Definition: XprHelper.h:80
Eigen::internal::cwise_promote_storage_type< Dense, Dense, Functor >::ret
Dense ret
Definition: XprHelper.h:549
Eigen::internal::promote_storage_type
Definition: XprHelper.h:518
T2
static const Pose3 T2(Rot3::Rodrigues(0.3, 0.2, 0.1), P2)
Eigen::Triplet< double >
Eigen::internal::product_promote_storage_type< A, Dense, ProductTag >::ret
Dense ret
Definition: XprHelper.h:582
Eigen::internal::product_promote_storage_type
Definition: XprHelper.h:578
Eigen::internal::plain_matrix_type_row_major
Definition: XprHelper.h:396
Eigen::AutoAlign
@ AutoAlign
Definition: Constants.h:323
Eigen::internal::evaluator
Definition: CoreEvaluators.h:90
Eigen::internal::variable_if_dynamicindex
Definition: XprHelper.h:154
Eigen::internal::is_diagonal::ret
@ ret
Definition: XprHelper.h:666
Eigen::internal::is_identity::value
@ value
Definition: XprHelper.h:679
Eigen::internal::make_proper_matrix_type::type
Matrix< _Scalar, _Rows, _Cols, Options, _MaxRows, _MaxCols > type
Definition: XprHelper.h:267
Eigen::internal::functor_traits::PacketAccess
@ PacketAccess
Definition: XprHelper.h:180
Eigen::internal::ref_selector
Definition: XprHelper.h:416
Eigen::internal::is_integral
Definition: Meta.h:159
Eigen::internal::convert_index
EIGEN_DEVICE_FUNC IndexDest convert_index(const IndexSrc &idx)
Definition: XprHelper.h:31
Eigen::DiagonalWrapper
Expression of a diagonal matrix.
Definition: DiagonalMatrix.h:293
EIGEN_DEFAULT_COPY_CONSTRUCTOR
#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS)
Definition: Macros.h:1221
Eigen::ArrayBase
Base class for all 1D and 2D array, and related expressions.
Definition: ArrayBase.h:39
Eigen::internal::product_promote_storage_type< A, PermutationStorage, ProductTag >::ret
A ret
Definition: XprHelper.h:590
Eigen::internal::promote_scalar_arg_unsupported< S, T, PromotedType, true, true >::type
PromotedType type
Definition: XprHelper.h:90
tree::f
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Definition: testExpression.cpp:218
Eigen::internal::variable_if_dynamicindex< T, DynamicIndex >::setValue
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T value)
Definition: XprHelper.h:172
Eigen::internal::dense_xpr_base< Derived, MatrixXpr >::type
MatrixBase< Derived > type
Definition: XprHelper.h:491
Eigen::internal::plain_matrix_type_column_major::Rows
@ Rows
Definition: XprHelper.h:380
Eigen::internal::product_promote_storage_type< Dense, PermutationStorage, ProductTag >::ret
Dense ret
Definition: XprHelper.h:592
Eigen::internal::product_promote_storage_type< PermutationStorage, B, ProductTag >::ret
B ret
Definition: XprHelper.h:591
Eigen::internal::find_best_packet_helper< Size, PacketType, true >
Definition: XprHelper.h:194
Eigen::internal::product_promote_storage_type< DiagonalShape, B, ProductTag >::ret
B ret
Definition: XprHelper.h:586
Eigen::ScalarBinaryOpTraits< typename NumTraits< typename internal::enable_if< NumTraits< T >::IsComplex, T >::type >::Real, T, BinaryOp >::ReturnType
T ReturnType
Definition: XprHelper.h:822
Eigen::LinearAccessBit
const unsigned int LinearAccessBit
Definition: Constants.h:130
Eigen::internal::find_best_packet
Definition: XprHelper.h:206
Eigen::internal::plain_matrix_type_dense
Definition: XprHelper.h:296
Eigen::internal::scalar_div_cost
Definition: XprHelper.h:710
Eigen::LinearVectorizedTraversal
@ LinearVectorizedTraversal
Definition: Constants.h:285
Eigen::internal::nested_eval::CoeffReadCost
@ CoeffReadCost
Definition: XprHelper.h:461
Eigen::internal::plain_diag_type
Definition: XprHelper.h:629
Eigen::internal::functor_traits::Cost
@ Cost
Definition: XprHelper.h:179
Eigen::internal::traits
Definition: ForwardDeclarations.h:17
Eigen::internal::plain_matrix_type_row_major::Cols
@ Cols
Definition: XprHelper.h:399
Eigen::internal::product_promote_storage_type< A, A, ProductTag >::ret
A ret
Definition: XprHelper.h:580
Eigen::PermutationStorage
Definition: Constants.h:516
Eigen::internal::cwise_promote_storage_type< A, A, Functor >::ret
A ret
Definition: XprHelper.h:548
Eigen::internal::variable_if_dynamicindex::setValue
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T)
Definition: XprHelper.h:162
Eigen::internal::variable_if_dynamic< T, Dynamic >::setValue
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T value)
Definition: XprHelper.h:149
Eigen::internal::plain_col_type::ArrayColType
Array< Scalar, ExpressionType::RowsAtCompileTime, 1, ExpressionType::PlainObject::Options &~RowMajor, ExpressionType::MaxRowsAtCompileTime, 1 > ArrayColType
Definition: XprHelper.h:619
Eigen::internal::plain_col_type::MatrixColType
Matrix< Scalar, ExpressionType::RowsAtCompileTime, 1, ExpressionType::PlainObject::Options &~RowMajor, ExpressionType::MaxRowsAtCompileTime, 1 > MatrixColType
Definition: XprHelper.h:617
Eigen::internal::no_assignment_operator::operator=
no_assignment_operator & operator=(const no_assignment_operator &)
Eigen::internal::cwise_promote_storage_type< Sparse, Dense, Functor >::ret
Sparse ret
Definition: XprHelper.h:552
std
Definition: BFloat16.h:88
Eigen::TriangularShape
Definition: Constants.h:533
Eigen::internal::conditional
Definition: Meta.h:109
Eigen::LinearTraversal
@ LinearTraversal
Definition: Constants.h:279
Eigen::internal::make_proper_matrix_type
Definition: XprHelper.h:257
Real
mp::number< mp::cpp_dec_float< 100 >, mp::et_on > Real
Definition: boostmultiprec.cpp:78
Eigen::internal::const_cast_ptr
EIGEN_DEVICE_FUNC T * const_cast_ptr(const T *ptr)
Definition: XprHelper.h:477
Eigen::internal::eval< T, Dense >::type
plain_matrix_type< T >::type type
Definition: XprHelper.h:336
Eigen::internal::is_same_dense
EIGEN_DEVICE_FUNC bool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if< possibly_same_dense< T1, T2 >::value >::type *=0)
Definition: XprHelper.h:695
Eigen::internal::promote_storage_type< A, const A >::ret
A ret
Definition: XprHelper.h:526
Eigen::internal::transfer_constness
Definition: XprHelper.h:433
v
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
Eigen::internal::plain_constant_type::matrix_type
Matrix< Scalar, traits< Expr >::RowsAtCompileTime, traits< Expr >::ColsAtCompileTime, Options, traits< Expr >::MaxRowsAtCompileTime, traits< Expr >::MaxColsAtCompileTime > matrix_type
Definition: XprHelper.h:653
Eigen::ScalarBinaryOpTraits< T, T, BinaryOp >::ReturnType
T ReturnType
Definition: XprHelper.h:811
Eigen::internal::cwise_promote_storage_type< Dense, B, Functor >::ret
Dense ret
Definition: XprHelper.h:551
EIGEN_NO_THROW
#define EIGEN_NO_THROW
Definition: Macros.h:1420
Eigen::internal::compute_default_alignment_helper
Definition: XprHelper.h:236
Eigen::internal::plain_col_type::type
conditional< is_same< typename traits< ExpressionType >::XprKind, MatrixXpr >::value, MatrixColType, ArrayColType >::type type
Definition: XprHelper.h:625
Eigen::internal::product_promote_storage_type< DiagonalShape, Dense, ProductTag >::ret
Dense ret
Definition: XprHelper.h:588
Eigen::internal::cwise_promote_storage_type< Dense, Sparse, Functor >::ret
Sparse ret
Definition: XprHelper.h:553
Eigen::internal::find_best_packet_helper< Size, PacketType, false >
Definition: XprHelper.h:200
Eigen::internal::plain_matrix_type_column_major::MaxCols
@ MaxCols
Definition: XprHelper.h:383
Eigen::internal::plain_matrix_type_row_major::MaxCols
@ MaxCols
Definition: XprHelper.h:401
Eigen::internal::is_same
Definition: Meta.h:148
Eigen::internal::no_assignment_operator
Definition: XprHelper.h:109
Eigen::Matrix
The matrix class, also used for vectors and row-vectors.
Definition: 3rdparty/Eigen/Eigen/src/Core/Matrix.h:178
Eigen::internal::functor_traits
Definition: XprHelper.h:175
Eigen::internal::plain_constant_type::type
CwiseNullaryOp< scalar_constant_op< Scalar >, const typename conditional< is_same< typename traits< Expr >::XprKind, MatrixXpr >::value, matrix_type, array_type >::type > type
Definition: XprHelper.h:655
Eigen::internal::plain_diag_type::diag_size
@ diag_size
Definition: XprHelper.h:631
internal
Definition: BandTriangularSolver.h:13
Eigen::internal::is_const
Definition: Meta.h:211
Eigen::MatrixBase
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
Eigen::DynamicIndex
const int DynamicIndex
Definition: Constants.h:27
Eigen::internal::valid_indexed_view_overload::value
@ value
Definition: XprHelper.h:55
Eigen::internal::compute_default_alignment
Definition: XprHelper.h:242
Eigen::internal::enable_if
Definition: Meta.h:273
Eigen::internal::nested_eval::CostEval
@ CostEval
Definition: XprHelper.h:467
Eigen::ColMajor
@ ColMajor
Definition: Constants.h:319
Eigen::NoPreferredStorageOrderBit
const unsigned int NoPreferredStorageOrderBit
Definition: Constants.h:178
T1
static const Similarity3 T1(R, Point3(3.5, -8.2, 4.2), 1)
Eigen::EvalBeforeNestingBit
const unsigned int EvalBeforeNestingBit
Definition: Constants.h:70
Eigen::internal::promote_index_type
Definition: XprHelper.h:120
Eigen::internal::cwise_promote_storage_order
Definition: XprHelper.h:555
Eigen::internal::plain_col_type
Definition: XprHelper.h:614
Eigen::internal::cwise_promote_storage_order::value
@ value
Definition: XprHelper.h:556
align_3::t
Point2 t(10, 10)
Eigen::internal::eval
Definition: XprHelper.h:332
Eigen::NestByRefBit
const unsigned int NestByRefBit
Definition: Constants.h:169
Eigen::internal::variable_if_dynamic::setValue
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T v) const
Definition: XprHelper.h:139
Eigen::internal::variable_if_dynamic< T, Dynamic >::variable_if_dynamic
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE variable_if_dynamic(T value=0) EIGEN_NO_THROW
Definition: XprHelper.h:146
Eigen::DiagonalBase
Definition: DiagonalMatrix.h:18
Eigen::NumTraits
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:232
test_callbacks.value
value
Definition: test_callbacks.py:160
EIGEN_SIZE_MIN_PREFER_FIXED
#define EIGEN_SIZE_MIN_PREFER_FIXED(a, b)
Definition: Macros.h:1302
Eigen::internal::size_at_compile_time
Definition: XprHelper.h:281
Eigen::internal::is_lvalue::value
@ value
Definition: XprHelper.h:661
Eigen::internal::cast_return_type::CurrentScalarType
XprType::Scalar CurrentScalarType
Definition: XprHelper.h:511
S
DiscreteKey S(1, 2)
Eigen::internal::has_direct_access
Definition: ForwardDeclarations.h:25
complex
Definition: datatypes.h:12
Scalar
SCALAR Scalar
Definition: bench_gemm.cpp:46
Eigen::Dense
Definition: Constants.h:507
Eigen::DiagonalShape
Definition: Constants.h:531
Eigen::internal::plain_matrix_type_row_major::MaxRows
@ MaxRows
Definition: XprHelper.h:400
Eigen::internal::promote_storage_type< const A, A >::ret
A ret
Definition: XprHelper.h:530
Eigen::internal::find_best_packet_helper
Definition: XprHelper.h:191
Eigen::internal::add_const_on_value_type
Definition: Meta.h:214


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:18:26