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