Please, help us to better know about our user community by answering the following short survey: https://forms.gle/wpyrxWi18ox9Z5ae9
 
Loading...
Searching...
No Matches
Eigen::AutoDiffScalar< DerivativeType > Class Template Reference

Detailed Description

template<typename DerivativeType>
class Eigen::AutoDiffScalar< DerivativeType >

A scalar type replacement with automatic differentiation capability.

Parameters
DerivativeTypethe 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:

  • std::abs, std::sqrt, std::pow, std::exp, std::log, std::sin, std::cos,
  • internal::abs, internal::sqrt, numext::pow, internal::exp, internal::log, internal::sin, internal::cos,
  • internal::conj, internal::real, internal::imag, numext::abs2.

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.

Public Member Functions

 AutoDiffScalar ()
 
 AutoDiffScalar (const Real &value)
 
 AutoDiffScalar (const Scalar &value, const DerType &der)
 
 AutoDiffScalar (const Scalar &value, int nbDer, int derNumber)
 

Constructor & Destructor Documentation

◆ AutoDiffScalar() [1/4]

template<typename DerivativeType >
Eigen::AutoDiffScalar< DerivativeType >::AutoDiffScalar ( )
inline

Default constructor without any initialization.

◆ AutoDiffScalar() [2/4]

template<typename DerivativeType >
Eigen::AutoDiffScalar< DerivativeType >::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

◆ AutoDiffScalar() [3/4]

template<typename DerivativeType >
Eigen::AutoDiffScalar< DerivativeType >::AutoDiffScalar ( const Real & value)
inline

Conversion from a scalar constant to an active scalar. The derivatives are set to zero.

◆ AutoDiffScalar() [4/4]

template<typename DerivativeType >
Eigen::AutoDiffScalar< DerivativeType >::AutoDiffScalar ( const Scalar & value,
const DerType & der )
inline

Constructs an active scalar from its value and derivatives der


The documentation for this class was generated from the following file: