![]() |
Eigen-unsupported
3.3.3
|
A scalar type replacement with automatic differentation capability.
_DerType | 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 _DerType can also be a reference (e.g., VectorXf& ) to wrap a existing vector into an AutoDiffScalar. Finally, _DerType 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.
Inherits auto_diff_special_op< _DerType,!internal::is_same< internal::traits< internal::remove_all< _DerType >::type >::Scalar, NumTraits< internal::traits< internal::remove_all< _DerType >::type >::Scalar >::Real >::value >.
Public Member Functions | |
AutoDiffScalar () | |
AutoDiffScalar (const Scalar &value, int nbDer, int derNumber) | |
AutoDiffScalar (const Real &value) | |
AutoDiffScalar (const Scalar &value, const DerType &der) |
Eigen::AutoDiffScalar< _DerType >::AutoDiffScalar | ( | ) | [inline] |
Default constructor without any initialization.
Eigen::AutoDiffScalar< _DerType >::AutoDiffScalar | ( | const Scalar & | value, |
int | nbDer, | ||
int | derNumber | ||
) | [inline] |
Constructs an active scalar from its value, and initializes the nbDer derivatives such that it corresponds to the derNumber -th variable
Eigen::AutoDiffScalar< _DerType >::AutoDiffScalar | ( | const Real & | value | ) | [inline] |
Conversion from a scalar constant to an active scalar. The derivatives are set to zero.
Eigen::AutoDiffScalar< _DerType >::AutoDiffScalar | ( | const Scalar & | value, |
const DerType & | der | ||
) | [inline] |
Constructs an active scalar from its value and derivatives der