Classes | |
class | AutoDiff |
A scalar type that performs automatic differentiation, similar to Eigen::AutoDiffScalar<Eigen::VectorXd> . More... | |
Functions | |
Increment and decrement | |
AutoDiff & | operator++ (AutoDiff &x) |
Standard prefix increment operator (i.e., ++x ). More... | |
AutoDiff | operator++ (AutoDiff &x, int) |
Standard postfix increment operator (i.e., x++ ). More... | |
AutoDiff & | operator-- (AutoDiff &x) |
Standard prefix decrement operator (i.e., --x ). More... | |
AutoDiff | operator-- (AutoDiff &x, int) |
Standard postfix decrement operator (i.e., x-- ). More... | |
Arithmetic operators | |
AutoDiff & | operator+= (AutoDiff &a, const AutoDiff &b) |
Standard compound addition and assignment operator. More... | |
AutoDiff & | operator+= (AutoDiff &a, double b) |
Standard compound addition and assignment operator. More... | |
AutoDiff & | operator-= (AutoDiff &a, const AutoDiff &b) |
Standard compound subtraction and assignment operator. More... | |
AutoDiff & | operator-= (AutoDiff &a, double b) |
Standard compound subtraction and assignment operator. More... | |
AutoDiff & | operator *= (AutoDiff &a, const AutoDiff &b) |
Standard compound multiplication and assignment operator. More... | |
AutoDiff & | operator *= (AutoDiff &a, double b) |
Standard compound multiplication and assignment operator. More... | |
AutoDiff & | operator/= (AutoDiff &a, const AutoDiff &b) |
Standard compound division and assignment operator. More... | |
AutoDiff & | operator/= (AutoDiff &a, double b) |
Standard compound division and assignment operator. More... | |
AutoDiff | operator+ (AutoDiff a, const AutoDiff &b) |
Standard addition operator. More... | |
AutoDiff | operator+ (AutoDiff a, double b) |
Standard addition operator. More... | |
AutoDiff | operator+ (double a, AutoDiff b) |
Standard addition operator. More... | |
AutoDiff | operator+ (AutoDiff x) |
Standard unary plus operator. More... | |
AutoDiff | operator- (AutoDiff a, const AutoDiff &b) |
Standard subtraction operator. More... | |
AutoDiff | operator- (AutoDiff a, double b) |
Standard subtraction operator. More... | |
AutoDiff | operator- (double a, AutoDiff b) |
Standard subtraction operator. More... | |
AutoDiff | operator- (AutoDiff x) |
Standard unary minus operator. More... | |
AutoDiff | operator * (AutoDiff a, const AutoDiff &b) |
Standard multiplication operator. More... | |
AutoDiff | operator * (AutoDiff a, double b) |
Standard multiplication operator. More... | |
AutoDiff | operator * (double a, AutoDiff b) |
Standard multiplication operator. More... | |
AutoDiff | operator/ (AutoDiff a, const AutoDiff &b) |
Standard division operator. More... | |
AutoDiff | operator/ (AutoDiff a, double b) |
Standard division operator. More... | |
AutoDiff | operator/ (double a, const AutoDiff &b) |
Standard division operator. More... | |
Comparison operators | |
bool | operator< (const AutoDiff &a, const AutoDiff &b) |
Standard comparison operator. More... | |
bool | operator<= (const AutoDiff &a, const AutoDiff &b) |
Standard comparison operator. More... | |
bool | operator> (const AutoDiff &a, const AutoDiff &b) |
Standard comparison operator. More... | |
bool | operator>= (const AutoDiff &a, const AutoDiff &b) |
Standard comparison operator. More... | |
bool | operator== (const AutoDiff &a, const AutoDiff &b) |
Standard comparison operator. More... | |
bool | operator!= (const AutoDiff &a, const AutoDiff &b) |
Standard comparison operator. More... | |
bool | operator< (const AutoDiff &a, double b) |
Standard comparison operator. More... | |
bool | operator<= (const AutoDiff &a, double b) |
Standard comparison operator. More... | |
bool | operator> (const AutoDiff &a, double b) |
Standard comparison operator. More... | |
bool | operator>= (const AutoDiff &a, double b) |
Standard comparison operator. More... | |
bool | operator== (const AutoDiff &a, double b) |
Standard comparison operator. More... | |
bool | operator!= (const AutoDiff &a, double b) |
Standard comparison operator. More... | |
bool | operator< (double a, const AutoDiff &b) |
Standard comparison operator. More... | |
bool | operator<= (double a, const AutoDiff &b) |
Standard comparison operator. More... | |
bool | operator> (double a, const AutoDiff &b) |
Standard comparison operator. More... | |
bool | operator>= (double a, const AutoDiff &b) |
Standard comparison operator. More... | |
bool | operator== (double a, const AutoDiff &b) |
Standard comparison operator. More... | |
bool | operator!= (double a, const AutoDiff &b) |
Standard comparison operator. More... | |
Minimum/maximum operations | |
const AutoDiff & | max (const AutoDiff &a, const AutoDiff &b) |
ADL overload to mimic std::max from <algorithm>. More... | |
AutoDiff | max (AutoDiff a, double b) |
ADL overload to mimic std::max from <algorithm>. More... | |
AutoDiff | max (double a, AutoDiff b) |
ADL overload to mimic std::max from <algorithm>. More... | |
const AutoDiff & | min (const AutoDiff &a, const AutoDiff &b) |
ADL overload to mimic std::min from <algorithm>. More... | |
AutoDiff | min (AutoDiff a, double b) |
ADL overload to mimic std::min from <algorithm>. More... | |
AutoDiff | min (double a, AutoDiff b) |
ADL overload to mimic std::min from <algorithm>. More... | |
Math functions: Basic operations | |
AutoDiff | abs (AutoDiff x) |
ADL overload to mimic std::abs from <cmath>. More... | |
AutoDiff | abs2 (AutoDiff x) |
ADL overload to mimic Eigen::numext::abs2. More... | |
Math functions: Exponential and Power functions | |
AutoDiff | exp (AutoDiff x) |
ADL overload to mimic std::exp from <cmath>. More... | |
AutoDiff | log (AutoDiff x) |
ADL overload to mimic std::log from <cmath>. More... | |
AutoDiff | pow (AutoDiff base, const AutoDiff &exp) |
ADL overload to mimic std::pow from <cmath>. More... | |
AutoDiff | pow (double base, const AutoDiff &exp) |
ADL overload to mimic std::pow from <cmath>. More... | |
AutoDiff | pow (AutoDiff base, double exp) |
ADL overload to mimic std::pow from <cmath>. More... | |
AutoDiff | sqrt (AutoDiff x) |
ADL overload to mimic std::sqrt from <cmath>. More... | |
Math functions: Trigonometric functions | |
AutoDiff | sin (AutoDiff x) |
ADL overload to mimic std::sin from <cmath>. More... | |
AutoDiff | cos (AutoDiff x) |
ADL overload to mimic std::cos from <cmath>. More... | |
AutoDiff | tan (AutoDiff x) |
ADL overload to mimic std::tan from <cmath>. More... | |
AutoDiff | asin (AutoDiff x) |
ADL overload to mimic std::asin from <cmath>. More... | |
AutoDiff | acos (AutoDiff x) |
ADL overload to mimic std::acos from <cmath>. More... | |
AutoDiff | atan (AutoDiff x) |
ADL overload to mimic std::atan from <cmath>. More... | |
AutoDiff | atan2 (AutoDiff a, const AutoDiff &b) |
ADL overload to mimic std::atan2 from <cmath>. More... | |
AutoDiff | atan2 (AutoDiff a, double b) |
ADL overload to mimic std::atan2 from <cmath>. More... | |
AutoDiff | atan2 (double a, AutoDiff b) |
ADL overload to mimic std::atan2 from <cmath>. More... | |
Math functions: Hyperbolic functions | |
AutoDiff | sinh (AutoDiff x) |
ADL overload to mimic std::sinh from <cmath>. More... | |
AutoDiff | cosh (AutoDiff x) |
ADL overload to mimic std::cosh from <cmath>. More... | |
AutoDiff | tanh (AutoDiff x) |
ADL overload to mimic std::tanh from <cmath>. More... | |
Math functions: Nearest integer floating point operations | |
AutoDiff | ceil (AutoDiff x) |
ADL overload to mimic std::ceil from <cmath>. More... | |
AutoDiff | floor (AutoDiff x) |
ADL overload to mimic std::floor from <cmath>. More... | |
AutoDiff | round (AutoDiff x) |
ADL overload to mimic std::round from <cmath>. More... | |
AutoDiff | nexttoward (AutoDiff from, long double to) |
ADL overload to mimic std::nexttoward from <cmath>. More... | |
bool | isfinite (const AutoDiff &x) |
ADL overload to mimic std::isfinite from <cmath>. More... | |
bool | isinf (const AutoDiff &x) |
ADL overload to mimic std::isinf from <cmath>. More... | |
bool | isnan (const AutoDiff &x) |
ADL overload to mimic std::isnan from <cmath>. More... | |
Miscellaneous functions | |
std::ostream & | operator<< (std::ostream &s, const AutoDiff &x) |
Outputs the value() part of x to the stream. More... | |
ADL overload to mimic std::atan2 from <cmath>.
ADL overload to mimic std::ceil from <cmath>.
The result's derivatives are always zero.
ADL overload to mimic std::floor from <cmath>.
The result's derivatives are always zero.
bool drake::ad::isfinite | ( | const AutoDiff & | x | ) |
ADL overload to mimic std::isfinite from <cmath>.
Because the return type is bool
, the derivatives are not preserved.
bool drake::ad::isinf | ( | const AutoDiff & | x | ) |
ADL overload to mimic std::isinf from <cmath>.
Because the return type is bool
, the derivatives are not preserved.
bool drake::ad::isnan | ( | const AutoDiff & | x | ) |
ADL overload to mimic std::isnan from <cmath>.
Because the return type is bool
, the derivatives are not preserved.
ADL overload to mimic std::max from <algorithm>.
Note that like std::max, this function returns a reference to whichever argument was chosen; it does not make a copy. When a
and b
are equal, retains the derivatives of a
(by returning a
) unless a
has empty derivatives, in which case b
is returned.
ADL overload to mimic std::max from <algorithm>.
When a
and b
are equal, retains the derivatives of a
.
ADL overload to mimic std::max from <algorithm>.
When a
and b
are equal, retains the derivatives of b
.
ADL overload to mimic std::min from <algorithm>.
Note that like std::min, this function returns a reference to whichever argument was chosen; it does not make a copy. When a
and b
are equal, retains the derivatives of a
(by returning a
) unless a
has empty derivatives, in which case b
is returned.
ADL overload to mimic std::min from <algorithm>.
When a
and b
are equal, retains the derivatives of a
.
ADL overload to mimic std::min from <algorithm>.
When a
and b
are equal, retains the derivatives of b
.
ADL overload to mimic std::nexttoward from <cmath>.
The result's derivatives are always zero.
Standard compound multiplication and assignment operator.
Standard compound multiplication and assignment operator.
Standard comparison operator.
Discards the derivatives.
Standard comparison operator.
Discards the derivatives.
Standard comparison operator.
Discards the derivatives.
Standard postfix increment operator (i.e., x++
).
Standard compound addition and assignment operator.
Standard compound addition and assignment operator.
Standard postfix decrement operator (i.e., x--
).
Standard compound subtraction and assignment operator.
Standard compound subtraction and assignment operator.
Standard compound division and assignment operator.
Standard compound division and assignment operator.
Standard comparison operator.
Discards the derivatives.
Standard comparison operator.
Discards the derivatives.
Standard comparison operator.
Discards the derivatives.
std::ostream& drake::ad::operator<< | ( | std::ostream & | s, |
const AutoDiff & | x | ||
) |
Outputs the value()
part of x to the stream.
To output the derivatives use << x.derivatives().transpose()
.
Standard comparison operator.
Discards the derivatives.
Standard comparison operator.
Discards the derivatives.
Standard comparison operator.
Discards the derivatives.
Standard comparison operator.
Discards the derivatives.
Standard comparison operator.
Discards the derivatives.
Standard comparison operator.
Discards the derivatives.
Standard comparison operator.
Discards the derivatives.
Standard comparison operator.
Discards the derivatives.
Standard comparison operator.
Discards the derivatives.
Standard comparison operator.
Discards the derivatives.
Standard comparison operator.
Discards the derivatives.
Standard comparison operator.
Discards the derivatives.
ADL overload to mimic std::pow from <cmath>.
The resulting partial derivative ∂/∂vᵢ is undefined (i.e., NaN) for all of the following cases:
In all other cases, if the base and exp partial derivatives were well-defined then the resulting partial derivatives will also be well-defined.
ADL overload to mimic std::pow from <cmath>.
Refer to pow(AutoDiff,const AutoDiff&) for an explanation of special cases.
ADL overload to mimic std::pow from <cmath>.
Refer to pow(AutoDiff,const AutoDiff&) for an explanation of special cases.
ADL overload to mimic std::round from <cmath>.
The result's derivatives are always zero.