Go to the documentation of this file.
13 #ifndef EIGEN_AUTODIFF_SCALAR_H_
14 #define EIGEN_AUTODIFF_SCALAR_H_
23 #include <Eigen/SparseCore>
29 template <
typename A,
typename B>
32 static void run(A&, B&) {}
36 template <
typename A,
typename B>
42 template <
typename _DerType,
bool Enable>
47 template <
typename _DerType>
50 template <
typename NewDerType>
80 template <
typename _DerType>
82 :
public internal::auto_diff_special_op<_DerType, !internal::is_same<typename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar,
83 typename NumTraits<typename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar>::Real>::value>
86 typedef internal::auto_diff_special_op<_DerType, !internal::is_same<typename internal::traits<typename internal::remove_all<_DerType>::type>
::Scalar,
87 typename NumTraits<typename internal::traits<typename internal::remove_all<_DerType>::type>
::Scalar>
::Real>
::value>
89 typedef typename internal::remove_all<_DerType>::type
DerType;
90 typedef typename internal::traits<DerType>::Scalar
Scalar;
91 typedef typename NumTraits<Scalar>::Real
Real;
93 using Base::operator+;
94 using Base::operator*;
121 template <
typename OtherDerType>
123 #ifndef EIGEN_PARSED_BY_DOXYGEN
125 typename internal::enable_if<
126 internal::is_same<
Scalar,
typename internal::traits<
typename internal::remove_all<OtherDerType>::type>::
Scalar>::
value && internal::is_convertible<OtherDerType, DerType>::value,
void*>::type = 0
135 return s << a.value();
143 template <
typename OtherDerType>
185 template <
typename OtherDerType>
190 template <
typename OtherDerType>
195 template <
typename OtherDerType>
200 template <
typename OtherDerType>
205 template <
typename OtherDerType>
210 template <
typename OtherDerType>
242 template <
typename OtherDerType>
252 template <
typename OtherDerType>
256 (*this) = (*this) + other;
277 template <
typename OtherDerType>
287 template <
typename OtherDerType>
291 this = *
this - other;
359 template <
typename OtherDerType>
360 inline const AutoDiffScalar<EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(
361 CwiseBinaryOp<internal::scalar_difference_op<Scalar> EIGEN_COMMA
const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(
DerType,
Scalar, product) EIGEN_COMMA
const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(
typename internal::remove_all<OtherDerType>::type,
Scalar, product)>,
Scalar, product)>
370 template <
typename OtherDerType>
372 const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(
DerType,
Scalar, product),
373 const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(
typename internal::remove_all<OtherDerType>::type,
Scalar, product)>>
384 this = *
this * other;
388 template <
typename OtherDerType>
391 this = *
this * other;
397 this = *
this / other;
401 template <
typename OtherDerType>
404 this = *
this / other;
415 template <
typename _DerType>
420 typedef typename remove_all<_DerType>::type
DerType;
421 typedef typename traits<DerType>::Scalar
Scalar;
422 typedef typename NumTraits<Scalar>::Real
Real;
448 derived().value() += other;
456 derived().value() * other,
457 derived().derivatives() * other);
465 a.derivatives() * other);
470 this = *
this * other;
475 template <
typename _DerType>
478 void operator*()
const;
479 void operator-()
const;
480 void operator+()
const;
483 template <
typename A_Scalar,
int A_Rows,
int A_Cols,
int A_Options,
int A_MaxRows,
int A_MaxCols,
typename B>
486 typedef Matrix<A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols>
A;
489 if ((A_Rows == Dynamic || A_Cols == Dynamic) && (a.size() == 0))
494 eigen_assert(a.size() == b.size() &&
"Eigen::AutoDiffScalar: derivatives are not compatible.");
498 template <
typename A,
typename B_Scalar,
int B_Rows,
int B_Cols,
int B_Options,
int B_MaxRows,
int B_MaxCols>
501 typedef Matrix<B_Scalar, B_Rows, B_Cols, B_Options, B_MaxRows, B_MaxCols>
B;
504 if ((B_Rows == Dynamic || B_Cols == Dynamic) && (b.size() == 0))
509 eigen_assert(a.size() == b.size() &&
"Eigen::AutoDiffScalar: derivatives are not compatible.");
513 template <
typename A_Scalar,
int A_Rows,
int A_Cols,
int A_Options,
int A_MaxRows,
int A_MaxCols,
514 typename B_Scalar,
int B_Rows,
int B_Cols,
int B_Options,
int B_MaxRows,
int B_MaxCols>
516 Matrix<B_Scalar, B_Rows, B_Cols, B_Options, B_MaxRows, B_MaxCols>>
518 typedef Matrix<A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols>
A;
519 typedef Matrix<B_Scalar, B_Rows, B_Cols, B_Options, B_MaxRows, B_MaxCols>
B;
522 if ((A_Rows == Dynamic || A_Cols == Dynamic) && (a.size() == 0))
527 else if ((B_Rows == Dynamic || B_Cols == Dynamic) && (b.size() == 0))
532 eigen_assert(a.size() == b.size() &&
"Eigen::AutoDiffScalar: derivatives are not compatible.");
536 template <
typename A_Scalar,
int A_Options,
typename A_Index,
typename B>
539 typedef SparseVector<A_Scalar, A_Options, A_Index>
A;
546 eigen_assert(a.size() == b.size() &&
"Eigen::AutoDiffScalar: derivatives are not compatible.");
550 template <
typename A,
typename B_Scalar,
int B_Options,
typename B_Index>
553 typedef SparseVector<B_Scalar, B_Options, B_Index>
B;
560 eigen_assert(a.size() == b.size() &&
"Eigen::AutoDiffScalar: derivatives are not compatible.");
564 template <
typename A_Scalar,
int A_Options,
typename A_Index,
565 typename B_Scalar,
int B_Options,
typename B_Index>
567 SparseVector<B_Scalar, B_Options, B_Index>>
569 typedef SparseVector<A_Scalar, A_Options, A_Index>
A;
570 typedef SparseVector<B_Scalar, B_Options, B_Index>
B;
577 else if (b.size() == 0)
581 eigen_assert(a.size() == b.size() &&
"Eigen::AutoDiffScalar: derivatives are not compatible.");
587 template <
typename DerType,
typename BinOp>
588 struct ScalarBinaryOpTraits<
AutoDiffScalar<DerType>, typename DerType::Scalar, BinOp>
593 template <
typename DerType,
typename BinOp>
594 struct ScalarBinaryOpTraits<typename DerType::Scalar,
AutoDiffScalar<DerType>, BinOp>
615 #define EIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(FUNC, CODE) \
616 template <typename DerType> \
617 inline const Eigen::AutoDiffScalar< \
618 EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(typename Eigen::internal::remove_all<DerType>::type, typename Eigen::internal::traits<typename Eigen::internal::remove_all<DerType>::type>::Scalar, product)> \
619 FUNC(const Eigen::AutoDiffScalar<DerType>& x) \
621 using namespace Eigen; \
622 typedef typename Eigen::internal::traits<typename Eigen::internal::remove_all<DerType>::type>::Scalar Scalar; \
623 EIGEN_UNUSED_VARIABLE(sizeof(Scalar)); \
627 template <
typename DerType>
632 template <
typename DerType>
637 template <
typename DerType>
642 template <
typename DerType,
typename T>
643 inline AutoDiffScalar<typename Eigen::internal::remove_all<DerType>::type::PlainObject>(min)(
const AutoDiffScalar<DerType>& x,
const T&
y)
646 return (x <=
y ? ADS(x) : ADS(
y));
648 template <
typename DerType,
typename T>
649 inline AutoDiffScalar<typename Eigen::internal::remove_all<DerType>::type::PlainObject>(max)(
const AutoDiffScalar<DerType>& x,
const T&
y)
651 typedef AutoDiffScalar<typename Eigen::internal::remove_all<DerType>::type::PlainObject> ADS;
652 return (x >=
y ? ADS(x) : ADS(
y));
654 template <
typename DerType,
typename T>
655 inline AutoDiffScalar<typename Eigen::internal::remove_all<DerType>::type::PlainObject>(min)(
const T& x,
const AutoDiffScalar<DerType>&
y)
657 typedef AutoDiffScalar<typename Eigen::internal::remove_all<DerType>::type::PlainObject> ADS;
658 return (x <
y ? ADS(x) : ADS(
y));
660 template <
typename DerType,
typename T>
661 inline AutoDiffScalar<typename Eigen::internal::remove_all<DerType>::type::PlainObject>(max)(
const T& x,
const AutoDiffScalar<DerType>&
y)
663 typedef AutoDiffScalar<typename Eigen::internal::remove_all<DerType>::type::PlainObject> ADS;
664 return (x >
y ? ADS(x) : ADS(
y));
666 template <
typename DerType>
667 inline AutoDiffScalar<typename Eigen::internal::remove_all<DerType>::type::PlainObject>(min)(
const AutoDiffScalar<DerType>& x,
const AutoDiffScalar<DerType>&
y)
669 return (x.value() <
y.value() ? x :
y);
671 template <
typename DerType>
672 inline AutoDiffScalar<typename Eigen::internal::remove_all<DerType>::type::PlainObject>(max)(
const AutoDiffScalar<DerType>& x,
const AutoDiffScalar<DerType>&
y)
674 return (x.value() >=
y.value() ? x :
y);
687 Scalar sqrtx = sqrt(x.value());
709 template <typename DerType>
711 EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(
typename internal::remove_all<DerType>::type,
typename internal::traits<
typename internal::remove_all<DerType>::type>::Scalar, product)>
714 using namespace Eigen;
719 template <
typename DerTypeA,
typename DerTypeB>
724 typedef typename internal::traits<typename internal::remove_all<DerTypeA>::type>::Scalar Scalar;
729 Scalar squared_hypot = a.value() * a.value() + b.value() * b.value();
732 ret.derivatives() = (a.derivatives() * b.value() - a.value() * b.derivatives()) / squared_hypot;
737 template <
typename DerTypeA,
typename DerTypeB>
742 typedef typename internal::traits<typename internal::remove_all<DerTypeA>::type>::Scalar Scalar;
747 Scalar squared_hypot = a.value() * a.value() + b.value() * b.value();
750 ret.derivatives() = (a.derivatives() * b.value() - a.value() * b.derivatives()) / squared_hypot;
787 template <typename DerType>
789 : NumTraits<
typename NumTraits<
typename internal::remove_all<DerType>::type::Scalar>::
Real>
793 0, DerTypeCleaned::MaxRowsAtCompileTime, DerTypeCleaned::MaxColsAtCompileTime>>
797 typedef typename NumTraits<typename DerTypeCleaned::Scalar>::Literal
Literal;
800 RequireInitialization = 1
804 template <
typename DerType_>
806 : NumTraits<typename NumTraits<typename internal::remove_all<SparseVector<DerType_>>::type::Scalar>::Real>
808 typedef typename internal::remove_all<SparseVector<DerType_>>::type
DerTypeCleaned;
812 typedef typename NumTraits<typename DerTypeCleaned::Scalar>::Literal
Literal;
815 RequireInitialization = 1
822 template <
typename T>
824 :
public numeric_limits<typename T::Scalar>
828 template <
typename T>
830 :
public numeric_limits<typename T::Scalar>
835 #endif // EIGEN_AUTODIFF_SCALAR_H_
Scalar m_value
Definition: autodiff_scalar.h:409
const AutoDiffScalar< DerType & > operator+(const Real &other) const
Definition: autodiff_scalar.h:436
const AutoDiffScalar< DerType > & conj(const AutoDiffScalar< DerType > &x)
Definition: autodiff_scalar.h:628
static void run(A &a, B &b)
Definition: autodiff_scalar.h:554
bool operator!=(const AutoDiffScalar< OtherDerType > &b) const
Definition: autodiff_scalar.h:211
AutoDiffScalar & operator/=(const AutoDiffScalar< OtherDerType > &other)
Definition: autodiff_scalar.h:402
Definition: autodiff_chain_hessian.h:16
NumTraits< typename DerTypeCleaned::Scalar >::Literal Literal
Definition: autodiff_scalar.h:812
Definition: autodiff_scalar.h:48
const AutoDiffScalar< CwiseBinaryOp< internal::scalar_difference_op< Scalar >, const DerType, const typename internal::remove_all< OtherDerType >::type > > operator-(const AutoDiffScalar< OtherDerType > &other) const
Definition: autodiff_scalar.h:279
bool operator!=(const Scalar &other) const
Definition: autodiff_scalar.h:178
bool operator>=(const AutoDiffScalar< OtherDerType > &b) const
Definition: autodiff_scalar.h:201
Matrix< A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols > A
Definition: autodiff_scalar.h:486
AutoDiffScalar & operator-=(const Scalar &other)
Definition: autodiff_scalar.h:271
const AutoDiffScalar< DerType & > operator-(const Scalar &b) const
Definition: autodiff_scalar.h:260
Eigen::internal::make_coherent_impl< Matrix< A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols >, Matrix< B_Scalar, B_Rows, B_Cols, B_Options, B_MaxRows, B_MaxCols > >::run static void run(A &a, B &b)
Definition: autodiff_scalar.h:520
internal::traits< DerType >::Scalar Scalar
Definition: autodiff_scalar.h:90
const friend AutoDiffScalar< DerType & > operator+(const Real &a, const AutoDiffScalar< _DerType > &b)
Definition: autodiff_scalar.h:441
static void run(A &a, B &b)
Definition: autodiff_scalar.h:571
internal::remove_all< SparseVector< DerType_ > >::type DerTypeCleaned
Definition: autodiff_scalar.h:808
SparseVector< B_Scalar, B_Options, B_Index > B
Definition: autodiff_scalar.h:553
bool operator>(const AutoDiffScalar< OtherDerType > &b) const
Definition: autodiff_scalar.h:196
const AutoDiffScalar< CwiseUnaryOp< internal::scalar_opposite_op< Scalar >, const DerType > > operator-() const
Definition: autodiff_scalar.h:296
bool operator<(const Scalar &other) const
Definition: autodiff_scalar.h:173
traits< DerType >::Scalar Scalar
Definition: autodiff_scalar.h:421
friend bool operator<(const Scalar &a, const AutoDiffScalar &b)
Definition: autodiff_scalar.h:179
friend std::ostream & operator<<(std::ostream &s, const AutoDiffScalar &a)
Definition: autodiff_scalar.h:133
AutoDiffScalar< DerType > NonInteger
Definition: autodiff_scalar.h:795
const AutoDiffScalar< EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(CwiseBinaryOp< internal::scalar_difference_op< Scalar > EIGEN_COMMA const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product) EIGEN_COMMA const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(typename internal::remove_all< OtherDerType >::type, Scalar, product)>, Scalar, product)> operator/(const AutoDiffScalar< OtherDerType > &other) const
Definition: autodiff_scalar.h:362
bool operator<=(const Scalar &other) const
Definition: autodiff_scalar.h:174
friend bool operator>(const Scalar &a, const AutoDiffScalar &b)
Definition: autodiff_scalar.h:181
internal::remove_all< DerType >::type DerTypeCleaned
Definition: autodiff_scalar.h:791
Eigen::internal::make_coherent_impl< Matrix< A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols >, Matrix< B_Scalar, B_Rows, B_Cols, B_Options, B_MaxRows, B_MaxCols > >::A Matrix< A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols > A
Definition: autodiff_scalar.h:518
const AutoDiffScalar< EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product)> operator/(const Scalar &other) const
Definition: autodiff_scalar.h:332
AutoDiffScalar< NewDerType > MakeAutoDiffScalar(const typename NewDerType::Scalar &value, const NewDerType &der)
Definition: autodiff_scalar.h:51
const AutoDiffScalar< _DerType > & derived() const
Definition: autodiff_scalar.h:434
AutoDiffScalar & operator=(const Scalar &other)
Definition: autodiff_scalar.h:158
AutoDiffScalar & operator*=(const Scalar &other)
Definition: autodiff_scalar.h:382
friend bool operator!=(const Scalar &a, const AutoDiffScalar &b)
Definition: autodiff_scalar.h:184
AutoDiffScalar & operator-=(const AutoDiffScalar< OtherDerType > &other)
Definition: autodiff_scalar.h:289
const AutoDiffScalar< typename CwiseUnaryOp< bind2nd_op< scalar_product_op< Scalar, Real > >, DerType >::Type > operator*(const Real &other) const
Definition: autodiff_scalar.h:453
const friend AutoDiffScalar< typename CwiseUnaryOp< bind1st_op< scalar_product_op< Real, Scalar > >, DerType >::Type > operator*(const Real &other, const AutoDiffScalar< _DerType > &a)
Definition: autodiff_scalar.h:461
AutoDiffScalar(const Scalar &value, const DerType &der)
Definition: autodiff_scalar.h:116
const T & y
Definition: autodiff_scalar.h:644
AutoDiffScalar< Matrix< typename NumTraits< typename DerTypeCleaned::Scalar >::Real, DerTypeCleaned::RowsAtCompileTime, DerTypeCleaned::ColsAtCompileTime, 0, DerTypeCleaned::MaxRowsAtCompileTime, DerTypeCleaned::MaxColsAtCompileTime > > Real
Definition: autodiff_scalar.h:794
@ AUTODIFF_IS_SUPPORTED_ONLY_WITH_EIGEN_3_3_0_OR_ABOVE
Definition: autodiff_scalar.h:18
AutoDiffScalar(const Real &value)
Definition: autodiff_scalar.h:108
const AutoDiffScalar< Matrix< typename internal::traits< typename internal::remove_all< DerTypeA >::type >::Scalar, Dynamic, 1 > > atan2(const AutoDiffScalar< DerTypeA > &a, const AutoDiffScalar< DerTypeB > &b)
Definition: autodiff_scalar.h:721
NumTraits< Scalar >::Real Real
Definition: autodiff_scalar.h:91
Scalar expx
Definition: autodiff_scalar.h:702
SparseVector< A_Scalar, A_Options, A_Index > A
Definition: autodiff_scalar.h:539
bool operator==(const Scalar &other) const
Definition: autodiff_scalar.h:177
AutoDiffScalar< SparseVector< typename NumTraits< typename DerTypeCleaned::Scalar >::Real, DerTypeCleaned::Options, typename DerTypeCleaned::StorageIndex > > Real
Definition: autodiff_scalar.h:809
bool operator<(const AutoDiffScalar< OtherDerType > &b) const
Definition: autodiff_scalar.h:186
internal::auto_diff_special_op< _DerType, !internal::is_same< typename internal::traits< typename internal::remove_all< _DerType >::type >::Scalar, typename NumTraits< typename internal::traits< typename internal::remove_all< _DerType >::type >::Scalar >::Real >::value > Base
Definition: autodiff_scalar.h:88
bool operator>=(const Scalar &other) const
Definition: autodiff_scalar.h:176
const Scalar & value() const
Definition: autodiff_scalar.h:169
const friend AutoDiffScalar< CwiseUnaryOp< internal::scalar_opposite_op< Scalar >, const DerType > > operator-(const Scalar &a, const AutoDiffScalar &b)
Definition: autodiff_scalar.h:266
internal::remove_all< _DerType >::type DerType
Definition: autodiff_scalar.h:89
DerType & derivatives()
Definition: autodiff_scalar.h:172
bool operator==(const AutoDiffScalar< OtherDerType > &b) const
Definition: autodiff_scalar.h:206
AutoDiffScalar(const AutoDiffScalar< OtherDerType > &other, typename internal::enable_if< internal::is_same< Scalar, typename internal::traits< typename internal::remove_all< OtherDerType >::type >::Scalar >::value &&internal::is_convertible< OtherDerType, DerType >::value, void * >::type=0)
Definition: autodiff_scalar.h:122
NumTraits< typename DerTypeCleaned::Scalar >::Literal Literal
Definition: autodiff_scalar.h:797
SparseVector< A_Scalar, A_Options, A_Index > A
Definition: autodiff_scalar.h:569
AutoDiffScalar & operator/=(const Scalar &other)
Definition: autodiff_scalar.h:395
AutoDiffScalar & operator*=(const AutoDiffScalar< OtherDerType > &other)
Definition: autodiff_scalar.h:389
AutoDiffScalar & operator=(const AutoDiffScalar< OtherDerType > &other)
Definition: autodiff_scalar.h:144
AutoDiffScalar< SparseVector< DerType_ > > NonInteger
Definition: autodiff_scalar.h:810
SparseVector< B_Scalar, B_Options, B_Index > B
Definition: autodiff_scalar.h:570
const AutoDiffScalar< DerType & > operator+(const Scalar &other) const
Definition: autodiff_scalar.h:216
NumTraits< Scalar >::Real Real
Definition: autodiff_scalar.h:422
AutoDiffScalar< _DerType > & operator*=(const Scalar &other)
Definition: autodiff_scalar.h:468
AutoDiffScalar & operator+=(const Scalar &other)
Definition: autodiff_scalar.h:236
friend bool operator==(const Scalar &a, const AutoDiffScalar &b)
Definition: autodiff_scalar.h:183
EIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(abs, using std::abs;return Eigen::MakeAutoDiffScalar(abs(x.value()), x.derivatives() *(x.value()< 0 ? -1 :1));) EIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(abs2
Definition: autodiff_scalar.h:43
const AutoDiffScalar< DerType > & real(const AutoDiffScalar< DerType > &x)
Definition: autodiff_scalar.h:633
const AutoDiffScalar< SparseVector< typename internal::traits< typename internal::remove_all< DerTypeA >::type >::Scalar > > atan2(const AutoDiffScalar< DerTypeA > &a, const AutoDiffScalar< DerTypeB > &b)
Definition: autodiff_scalar.h:739
static void run(A &a, B &b)
Definition: autodiff_scalar.h:540
const AutoDiffScalar< CwiseBinaryOp< internal::scalar_sum_op< Scalar >, const DerType, const typename internal::remove_all< OtherDerType >::type > > operator+(const AutoDiffScalar< OtherDerType > &other) const
Definition: autodiff_scalar.h:244
const friend AutoDiffScalar< EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product)> operator/(const Scalar &other, const AutoDiffScalar &a)
Definition: autodiff_scalar.h:338
const friend AutoDiffScalar< DerType & > operator+(const Scalar &a, const AutoDiffScalar &b)
Definition: autodiff_scalar.h:221
const AutoDiffScalar< CwiseBinaryOp< internal::scalar_sum_op< Scalar >, const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product), const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(typename internal::remove_all< OtherDerType >::type, Scalar, product)> > operator*(const AutoDiffScalar< OtherDerType > &other) const
Definition: autodiff_scalar.h:374
AutoDiffScalar()
Definition: autodiff_scalar.h:97
DerType::Scalar imag(const AutoDiffScalar< DerType > &)
Definition: autodiff_scalar.h:638
AutoDiffScalar(const Scalar &value, int nbDer, int derNumber)
Definition: autodiff_scalar.h:100
friend bool operator<=(const Scalar &a, const AutoDiffScalar &b)
Definition: autodiff_scalar.h:180
Definition: autodiff_scalar.h:30
const friend AutoDiffScalar< EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product)> operator*(const Scalar &other, const AutoDiffScalar &a)
Definition: autodiff_scalar.h:310
Definition: autodiff_scalar.h:820
void make_coherent(const A &a, const B &b)
Definition: autodiff_scalar.h:37
AutoDiffScalar(const AutoDiffScalar &other)
Definition: autodiff_scalar.h:138
const DerType & derivatives() const
Definition: autodiff_scalar.h:171
AutoDiffScalar< DerType > ReturnType
Definition: autodiff_scalar.h:590
AutoDiffScalar< SparseVector< DerType_ > > Nested
Definition: autodiff_scalar.h:811
AutoDiffScalar< DerType > Nested
Definition: autodiff_scalar.h:796
AutoDiffScalar< _DerType > & derived()
Definition: autodiff_scalar.h:435
Scalar & value()
Definition: autodiff_scalar.h:170
const AutoDiffScalar< EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product)> operator*(const Scalar &other) const
Definition: autodiff_scalar.h:304
static void run(A &, B &)
Definition: autodiff_scalar.h:32
AutoDiffScalar & operator=(const AutoDiffScalar &other)
Definition: autodiff_scalar.h:151
bool operator<=(const AutoDiffScalar< OtherDerType > &b) const
Definition: autodiff_scalar.h:191
Eigen::internal::make_coherent_impl< Matrix< A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols >, Matrix< B_Scalar, B_Rows, B_Cols, B_Options, B_MaxRows, B_MaxCols > >::B Matrix< B_Scalar, B_Rows, B_Cols, B_Options, B_MaxRows, B_MaxCols > B
Definition: autodiff_scalar.h:519
AutoDiffScalar & operator+=(const AutoDiffScalar< OtherDerType > &other)
Definition: autodiff_scalar.h:254
Matrix< B_Scalar, B_Rows, B_Cols, B_Options, B_MaxRows, B_MaxCols > B
Definition: autodiff_scalar.h:501
bool operator>(const Scalar &other) const
Definition: autodiff_scalar.h:175
AutoDiffScalar< _DerType > & operator+=(const Real &other)
Definition: autodiff_scalar.h:446
DerType m_derivatives
Definition: autodiff_scalar.h:410
AutoDiffScalar< DerType > ReturnType
Definition: autodiff_scalar.h:596
static void run(A &a, B &b)
Definition: autodiff_scalar.h:502
remove_all< _DerType >::type DerType
Definition: autodiff_scalar.h:420
friend bool operator>=(const Scalar &a, const AutoDiffScalar &b)
Definition: autodiff_scalar.h:182
static void run(A &a, B &b)
Definition: autodiff_scalar.h:487