casacore
|
Implements all mathematical operators and functions for AutoDiff. More...
#include <AutoDiffMath.h>
Public Member Functions | |
template<class T > | |
AutoDiff< T > | operator+ (const AutoDiff< T > &other) |
Unary arithmetic operators. More... | |
template<class T > | |
AutoDiff< T > | operator- (const AutoDiff< T > &other) |
template<class T > | |
AutoDiff< T > | operator+ (const AutoDiff< T > &left, const AutoDiff< T > &right) |
Arithmetic on two AutoDiff objects, returning an AutoDiff object. More... | |
template<class T > | |
AutoDiff< T > | operator- (const AutoDiff< T > &left, const AutoDiff< T > &right) |
template<class T > | |
AutoDiff< T > | operator* (const AutoDiff< T > &left, const AutoDiff< T > &right) |
template<class T > | |
AutoDiff< T > | operator/ (const AutoDiff< T > &left, const AutoDiff< T > &right) |
template<class T > | |
AutoDiff< T > | operator+ (const AutoDiff< T > &left, const T &right) |
Arithmetic on an AutoDiff and a scalar, returning an AutoDiff. More... | |
template<class T > | |
AutoDiff< T > | operator- (const AutoDiff< T > &left, const T &right) |
template<class T > | |
AutoDiff< T > | operator* (const AutoDiff< T > &left, const T &right) |
template<class T > | |
AutoDiff< T > | operator/ (const AutoDiff< T > &left, const T &right) |
template<class T > | |
AutoDiff< T > | operator+ (const T &left, const AutoDiff< T > &right) |
Arithmetic between a scalar and an AutoDiff returning an AutoDiff. More... | |
template<class T > | |
AutoDiff< T > | operator- (const T &left, const AutoDiff< T > &right) |
template<class T > | |
AutoDiff< T > | operator* (const T &left, const AutoDiff< T > &right) |
template<class T > | |
AutoDiff< T > | operator/ (const T &left, const AutoDiff< T > &right) |
template<class T > | |
AutoDiff< T > | acos (const AutoDiff< T > &ad) |
Transcendental functions. More... | |
template<class T > | |
AutoDiff< T > | asin (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | atan (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | atan2 (const AutoDiff< T > &y, const AutoDiff< T > &x) |
template<class T > | |
AutoDiff< T > | cos (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | cosh (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | exp (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | log (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | log10 (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | erf (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | erfc (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | pow (const AutoDiff< T > &a, const AutoDiff< T > &b) |
template<class T > | |
AutoDiff< T > | pow (const AutoDiff< T > &a, const T &b) |
template<class T > | |
AutoDiff< T > | square (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | cube (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | sin (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | sinh (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | sqrt (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | tan (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | tanh (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | abs (const AutoDiff< T > &ad) |
template<class T > | |
AutoDiff< T > | fmod (const AutoDiff< T > &x, const T &c) |
Floating-point remainder of x/c, with the same sign as x, where c is a constant. More... | |
template<class T > | |
AutoDiff< T > | fmod (const AutoDiff< T > &x, const AutoDiff< T > &c) |
template<class T > | |
AutoDiff< T > | floor (const AutoDiff< T > &ad) |
Floor and ceil of values. More... | |
template<class T > | |
AutoDiff< T > | ceil (const AutoDiff< T > &ad) |
template<class T > | |
Bool | operator> (const AutoDiff< T > &left, const AutoDiff< T > &right) |
Comparison operators. More... | |
template<class T > | |
Bool | operator< (const AutoDiff< T > &left, const AutoDiff< T > &right) |
template<class T > | |
Bool | operator>= (const AutoDiff< T > &left, const AutoDiff< T > &right) |
template<class T > | |
Bool | operator<= (const AutoDiff< T > &left, const AutoDiff< T > &right) |
template<class T > | |
Bool | operator== (const AutoDiff< T > &left, const AutoDiff< T > &right) |
template<class T > | |
Bool | operator!= (const AutoDiff< T > &left, const AutoDiff< T > &right) |
template<class T > | |
Bool | near (const AutoDiff< T > &left, const AutoDiff< T > &right) |
template<class T > | |
Bool | near (const AutoDiff< T > &left, const AutoDiff< T > &right, const Double tol) |
template<class T > | |
Bool | allnear (const AutoDiff< T > &left, const AutoDiff< T > &right, const Double tol) |
template<class T > | |
Bool | nearAbs (const AutoDiff< T > &left, const AutoDiff< T > &right, const Double tol) |
template<class T > | |
Bool | allnearAbs (const AutoDiff< T > &left, const AutoDiff< T > &right, const Double tol) |
template<class T > | |
Bool | operator> (const AutoDiff< T > &left, const T &right) |
Compare an AutoDiff and a constant. More... | |
template<class T > | |
Bool | operator< (const AutoDiff< T > &left, const T &right) |
template<class T > | |
Bool | operator>= (const AutoDiff< T > &left, const T &right) |
template<class T > | |
Bool | operator<= (const AutoDiff< T > &left, const T &right) |
template<class T > | |
Bool | operator== (const AutoDiff< T > &left, const T &right) |
template<class T > | |
Bool | operator!= (const AutoDiff< T > &left, const T &right) |
template<class T > | |
Bool | near (const AutoDiff< T > &left, const T &right) |
template<class T > | |
Bool | near (const AutoDiff< T > &left, const T &right, const Double tol) |
template<class T > | |
Bool | allnear (const AutoDiff< T > &left, const T &right, const Double tol) |
template<class T > | |
Bool | nearAbs (const AutoDiff< T > &left, const T &right, const Double tol) |
template<class T > | |
Bool | allnearAbs (const AutoDiff< T > &left, const T &right, const Double tol) |
template<class T > | |
Bool | operator> (const T &left, const AutoDiff< T > &right) |
Compare a constant and an AutoDiff. More... | |
template<class T > | |
Bool | operator< (const T &left, const AutoDiff< T > &right) |
template<class T > | |
Bool | operator>= (const T &left, const AutoDiff< T > &right) |
template<class T > | |
Bool | operator<= (const T &left, const AutoDiff< T > &right) |
template<class T > | |
Bool | operator== (const T &left, const AutoDiff< T > &right) |
template<class T > | |
Bool | operator!= (const T &left, const AutoDiff< T > &right) |
template<class T > | |
Bool | near (const T &left, const AutoDiff< T > &right, const Double tol) |
template<class T > | |
Bool | allnear (const T &left, const AutoDiff< T > &right, const Double tol) |
template<class T > | |
Bool | nearAbs (const T &left, const AutoDiff< T > &right, const Double tol) |
template<class T > | |
Bool | allnearAbs (const T &left, const AutoDiff< T > &right, const Double tol) |
template<class T > | |
Bool | isNaN (const AutoDiff< T > &val) |
Test special values. More... | |
template<class T > | |
Bool | isInf (AutoDiff< T > &val) |
template<class T > | |
AutoDiff< T > | min (const AutoDiff< T > &left, const AutoDiff< T > &right) |
Minimum/maximum. More... | |
template<class T > | |
AutoDiff< T > | max (const AutoDiff< T > &left, const AutoDiff< T > &right) |
Implements all mathematical operators and functions for AutoDiff.
Implements all mathematical operators and functions for AutoDiff.
Definition at line 60 of file AutoDiffMath.h.
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::abs | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::acos | ( | const AutoDiff< T > & | ad | ) |
Transcendental functions.
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::allnear | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right, | ||
const Double | tol | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::allnear | ( | const AutoDiff< T > & | left, |
const T & | right, | ||
const Double | tol | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::allnear | ( | const T & | left, |
const AutoDiff< T > & | right, | ||
const Double | tol | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::allnearAbs | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right, | ||
const Double | tol | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::allnearAbs | ( | const AutoDiff< T > & | left, |
const T & | right, | ||
const Double | tol | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::allnearAbs | ( | const T & | left, |
const AutoDiff< T > & | right, | ||
const Double | tol | ||
) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::asin | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::atan | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::atan2 | ( | const AutoDiff< T > & | y, |
const AutoDiff< T > & | x | ||
) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::ceil | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::cos | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::cosh | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::cube | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::erf | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::erfc | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::exp | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::floor | ( | const AutoDiff< T > & | ad | ) |
Floor and ceil of values.
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::fmod | ( | const AutoDiff< T > & | x, |
const T & | c | ||
) |
Floating-point remainder of x/c, with the same sign as x, where c is a constant.
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::fmod | ( | const AutoDiff< T > & | x, |
const AutoDiff< T > & | c | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::isInf | ( | AutoDiff< T > & | val | ) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::isNaN | ( | const AutoDiff< T > & | val | ) |
Test special values.
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::log | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::log10 | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::max | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right | ||
) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::min | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right | ||
) |
Minimum/maximum.
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::near | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::near | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right, | ||
const Double | tol | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::near | ( | const AutoDiff< T > & | left, |
const T & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::near | ( | const AutoDiff< T > & | left, |
const T & | right, | ||
const Double | tol | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::near | ( | const T & | left, |
const AutoDiff< T > & | right, | ||
const Double | tol | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::nearAbs | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right, | ||
const Double | tol | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::nearAbs | ( | const AutoDiff< T > & | left, |
const T & | right, | ||
const Double | tol | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::nearAbs | ( | const T & | left, |
const AutoDiff< T > & | right, | ||
const Double | tol | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator!= | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator!= | ( | const AutoDiff< T > & | left, |
const T & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator!= | ( | const T & | left, |
const AutoDiff< T > & | right | ||
) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator* | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right | ||
) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator* | ( | const AutoDiff< T > & | left, |
const T & | right | ||
) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator* | ( | const T & | left, |
const AutoDiff< T > & | right | ||
) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator+ | ( | const AutoDiff< T > & | other | ) |
Unary arithmetic operators.
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator- | ( | const AutoDiff< T > & | other | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator- | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right | ||
) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator- | ( | const AutoDiff< T > & | left, |
const T & | right | ||
) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator- | ( | const T & | left, |
const AutoDiff< T > & | right | ||
) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator/ | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right | ||
) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator/ | ( | const AutoDiff< T > & | left, |
const T & | right | ||
) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator/ | ( | const T & | left, |
const AutoDiff< T > & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator< | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator< | ( | const AutoDiff< T > & | left, |
const T & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator< | ( | const T & | left, |
const AutoDiff< T > & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator<= | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator<= | ( | const AutoDiff< T > & | left, |
const T & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator<= | ( | const T & | left, |
const AutoDiff< T > & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator== | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator== | ( | const AutoDiff< T > & | left, |
const T & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator== | ( | const T & | left, |
const AutoDiff< T > & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator> | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right | ||
) |
Comparison operators.
Only the values are compared: in the actual functions, comparisons are used to decide on algorithms. To check if two AutoDiff values are equal, use comparison for both value and derivatives.
Tip: To check if two AutoDiff values are equal, use the member method equals()
(e;g; for debugging and testing);
Compare two AutoDiff's
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator> | ( | const AutoDiff< T > & | left, |
const T & | right | ||
) |
Compare an AutoDiff and a constant.
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator> | ( | const T & | left, |
const AutoDiff< T > & | right | ||
) |
Compare a constant and an AutoDiff.
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator>= | ( | const AutoDiff< T > & | left, |
const AutoDiff< T > & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator>= | ( | const AutoDiff< T > & | left, |
const T & | right | ||
) |
Bool casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::operator>= | ( | const T & | left, |
const AutoDiff< T > & | right | ||
) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::pow | ( | const AutoDiff< T > & | a, |
const AutoDiff< T > & | b | ||
) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::pow | ( | const AutoDiff< T > & | a, |
const T & | b | ||
) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::sin | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::sinh | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::sqrt | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::square | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::tan | ( | const AutoDiff< T > & | ad | ) |
AutoDiff<T> casacore::AutoDiffMath_global_functions_AutoDiff_mathematical_operations::tanh | ( | const AutoDiff< T > & | ad | ) |