A scalar type replacement with automatic differentiation capability. More...
Inherits Eigen::internal::auto_diff_special_op< DerivativeType, !internal::is_same< internal::traits< internal::remove_all_t< DerivativeType > >::Scalar, NumTraits< internal::traits< internal::remove_all_t< DerivativeType > >::Scalar >::Real >::value >.
Public Types | |
typedef internal::auto_diff_special_op< DerivativeType, !internal::is_same< typename internal::traits< internal::remove_all_t< DerivativeType > >::Scalar, typename NumTraits< typename internal::traits< internal::remove_all_t< DerivativeType > >::Scalar >::Real >::value > | Base |
typedef internal::remove_all_t< DerivativeType > | DerType |
typedef NumTraits< Scalar >::Real | Real |
typedef internal::traits< DerType >::Scalar | Scalar |
Public Member Functions | |
AutoDiffScalar () | |
AutoDiffScalar (const AutoDiffScalar &other) | |
template<typename OtherDerType > | |
AutoDiffScalar (const AutoDiffScalar< OtherDerType > &other) | |
AutoDiffScalar (const Real &value) | |
AutoDiffScalar (const Scalar &value, const DerType &der) | |
AutoDiffScalar (const Scalar &value, int nbDer, int derNumber) | |
DerType & | derivatives () |
const DerType & | derivatives () const |
template<typename OtherDerType > | |
bool | operator!= (const AutoDiffScalar< OtherDerType > &b) const |
bool | operator!= (const Scalar &other) const |
template<typename OtherDerType > | |
AutoDiffScalar< CwiseBinaryOp< internal::scalar_sum_op< Scalar >, const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product), const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(internal::remove_all_t< OtherDerType >, Scalar, product) > > | operator* (const AutoDiffScalar< OtherDerType > &other) const |
AutoDiffScalar< EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product) > | operator* (const Scalar &other) const |
template<typename OtherDerType > | |
AutoDiffScalar & | operator*= (const AutoDiffScalar< OtherDerType > &other) |
AutoDiffScalar & | operator*= (const Scalar &other) |
template<typename OtherDerType > | |
AutoDiffScalar< CwiseBinaryOp< internal::scalar_sum_op< Scalar >, const DerType, const internal::remove_all_t< OtherDerType > > > | operator+ (const AutoDiffScalar< OtherDerType > &other) const |
AutoDiffScalar< DerType & > | operator+ (const Scalar &other) const |
template<typename OtherDerType > | |
AutoDiffScalar & | operator+= (const AutoDiffScalar< OtherDerType > &other) |
AutoDiffScalar & | operator+= (const Scalar &other) |
AutoDiffScalar< CwiseUnaryOp< internal::scalar_opposite_op< Scalar >, const DerType > > | operator- () const |
template<typename OtherDerType > | |
AutoDiffScalar< CwiseBinaryOp< internal::scalar_difference_op< Scalar >, const DerType, const internal::remove_all_t< OtherDerType > > > | operator- (const AutoDiffScalar< OtherDerType > &other) const |
AutoDiffScalar< DerType & > | operator- (const Scalar &b) const |
template<typename OtherDerType > | |
AutoDiffScalar & | operator-= (const AutoDiffScalar< OtherDerType > &other) |
AutoDiffScalar & | operator-= (const Scalar &other) |
template<typename OtherDerType > | |
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(internal::remove_all_t< OtherDerType >, Scalar, product) >, Scalar, product) > | operator/ (const AutoDiffScalar< OtherDerType > &other) const |
AutoDiffScalar< EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product) > | operator/ (const Scalar &other) const |
template<typename OtherDerType > | |
AutoDiffScalar & | operator/= (const AutoDiffScalar< OtherDerType > &other) |
AutoDiffScalar & | operator/= (const Scalar &other) |
template<typename OtherDerType > | |
bool | operator< (const AutoDiffScalar< OtherDerType > &b) const |
bool | operator< (const Scalar &other) const |
template<typename OtherDerType > | |
bool | operator<= (const AutoDiffScalar< OtherDerType > &b) const |
bool | operator<= (const Scalar &other) const |
AutoDiffScalar & | operator= (const AutoDiffScalar &other) |
template<typename OtherDerType > | |
AutoDiffScalar & | operator= (const AutoDiffScalar< OtherDerType > &other) |
AutoDiffScalar & | operator= (const Scalar &other) |
template<typename OtherDerType > | |
bool | operator== (const AutoDiffScalar< OtherDerType > &b) const |
bool | operator== (const Scalar &other) const |
template<typename OtherDerType > | |
bool | operator> (const AutoDiffScalar< OtherDerType > &b) const |
bool | operator> (const Scalar &other) const |
template<typename OtherDerType > | |
bool | operator>= (const AutoDiffScalar< OtherDerType > &b) const |
bool | operator>= (const Scalar &other) const |
Scalar & | value () |
const Scalar & | value () const |
Protected Attributes | |
DerType | m_derivatives |
Scalar | m_value |
A scalar type replacement with automatic differentiation capability.
DerivativeType | the vector type used to store/represent the derivatives. The base scalar type as well as the number of derivatives to compute are determined from this type. Typical choices include, e.g., Vector4f for 4 derivatives, or VectorXf if the number of derivatives is not known at compile time, and/or, the number of derivatives is large. Note that DerivativeType can also be a reference (e.g., VectorXf& ) to wrap a existing vector into an AutoDiffScalar. Finally, DerivativeType can also be any Eigen compatible expression. |
This class represents a scalar value while tracking its respective derivatives using Eigen's expression template mechanism.
It supports the following list of global math function:
AutoDiffScalar can be used as the scalar type of an Eigen::Matrix object. However, in that case, the expression template mechanism only occurs at the top Matrix level, while derivatives are computed right away.
Definition at line 69 of file AutoDiffScalar.h.
typedef internal::auto_diff_special_op<DerivativeType, !internal::is_same<typename internal::traits<internal::remove_all_t<DerivativeType> >::Scalar, typename NumTraits<typename internal::traits<internal::remove_all_t<DerivativeType> >::Scalar>::Real>::value> Eigen::AutoDiffScalar< DerivativeType >::Base |
Definition at line 77 of file AutoDiffScalar.h.
typedef internal::remove_all_t<DerivativeType> Eigen::AutoDiffScalar< DerivativeType >::DerType |
Definition at line 78 of file AutoDiffScalar.h.
typedef NumTraits<Scalar>::Real Eigen::AutoDiffScalar< DerivativeType >::Real |
Definition at line 80 of file AutoDiffScalar.h.
typedef internal::traits<DerType>::Scalar Eigen::AutoDiffScalar< DerivativeType >::Scalar |
Definition at line 79 of file AutoDiffScalar.h.
|
inline |
Default constructor without any initialization.
Definition at line 86 of file AutoDiffScalar.h.
|
inline |
Constructs an active scalar from its value, and initializes the nbDer derivatives such that it corresponds to the derNumber -th variable
Definition at line 90 of file AutoDiffScalar.h.
|
inline |
Conversion from a scalar constant to an active scalar. The derivatives are set to zero.
Definition at line 98 of file AutoDiffScalar.h.
|
inline |
Constructs an active scalar from its value and derivatives der
Definition at line 106 of file AutoDiffScalar.h.
|
inline |
Definition at line 111 of file AutoDiffScalar.h.
|
inline |
Definition at line 126 of file AutoDiffScalar.h.
|
inline |
Definition at line 160 of file AutoDiffScalar.h.
|
inline |
Definition at line 159 of file AutoDiffScalar.h.
|
inline |
Definition at line 181 of file AutoDiffScalar.h.
|
inline |
Definition at line 167 of file AutoDiffScalar.h.
|
inline |
Definition at line 345 of file AutoDiffScalar.h.
|
inline |
Definition at line 272 of file AutoDiffScalar.h.
|
inline |
Definition at line 360 of file AutoDiffScalar.h.
|
inline |
Definition at line 353 of file AutoDiffScalar.h.
|
inline |
Definition at line 211 of file AutoDiffScalar.h.
|
inline |
Definition at line 183 of file AutoDiffScalar.h.
|
inline |
Definition at line 221 of file AutoDiffScalar.h.
|
inline |
Definition at line 203 of file AutoDiffScalar.h.
|
inline |
Definition at line 264 of file AutoDiffScalar.h.
|
inline |
Definition at line 247 of file AutoDiffScalar.h.
|
inline |
Definition at line 227 of file AutoDiffScalar.h.
|
inline |
Definition at line 257 of file AutoDiffScalar.h.
|
inline |
Definition at line 239 of file AutoDiffScalar.h.
|
inline |
Definition at line 332 of file AutoDiffScalar.h.
|
inline |
Definition at line 300 of file AutoDiffScalar.h.
|
inline |
Definition at line 373 of file AutoDiffScalar.h.
|
inline |
Definition at line 366 of file AutoDiffScalar.h.
|
inline |
Definition at line 176 of file AutoDiffScalar.h.
|
inline |
Definition at line 162 of file AutoDiffScalar.h.
|
inline |
Definition at line 177 of file AutoDiffScalar.h.
|
inline |
Definition at line 163 of file AutoDiffScalar.h.
|
inline |
Definition at line 138 of file AutoDiffScalar.h.
|
inline |
Definition at line 131 of file AutoDiffScalar.h.
|
inline |
Definition at line 145 of file AutoDiffScalar.h.
|
inline |
Definition at line 180 of file AutoDiffScalar.h.
|
inline |
Definition at line 166 of file AutoDiffScalar.h.
|
inline |
Definition at line 178 of file AutoDiffScalar.h.
|
inline |
Definition at line 164 of file AutoDiffScalar.h.
|
inline |
Definition at line 179 of file AutoDiffScalar.h.
|
inline |
Definition at line 165 of file AutoDiffScalar.h.
|
inline |
Definition at line 157 of file AutoDiffScalar.h.
|
inline |
Definition at line 156 of file AutoDiffScalar.h.
|
protected |
Definition at line 381 of file AutoDiffScalar.h.
|
protected |
Definition at line 380 of file AutoDiffScalar.h.