|
constexpr | dual (const value_type re=value_type(), const value_type du=value_type()) |
| Construct dual from optional real and dual parts.
|
|
template<class X , CPPDUALS_ONLY_SAME_DEPTH_AS_T(T, X) , CPPDUALS_ENABLE_IF(!is_complex< X >::value) > |
| dual (const dual< X > &x) |
| Copy construct from a dual of equal depth.
|
|
| operator std::complex< dual< T >> () |
| Cast to a complex<dual<>> with real part equal to *this.
|
|
template<class X , CPPDUALS_ENABLE_IF(std::is_arithmetic< X >::value &&!is_dual< X >::value) > |
| operator X () const |
| Explicit cast to an arithmetic type retains the rpart()
|
|
T | rpart () const |
| Get the real part.
|
|
T | dpart () const |
| Get the dual part.
|
|
void | rpart (value_type re) |
| Set the real part.
|
|
void | dpart (value_type du) |
| Get the dual part.
|
|
dual< T > | operator- () const |
| Unary negation.
|
|
dual< T > | operator+ () const |
| Unary nothing.
|
|
dual< T > & | operator= (const T &x) |
| Assignment of value_type assigns the real part and zeros the dual part.
|
|
dual< T > & | operator+= (const T &x) |
| Add a relatively-scalar to this dual.
|
|
dual< T > & | operator-= (const T &x) |
| Subtract a relatively-scalar from this dual.
|
|
dual< T > & | operator*= (const T &x) |
| Multiply a relatively-scalar with this dual.
|
|
dual< T > & | operator/= (const T &x) |
| Divide this dual by relatively-scalar.
|
|
template<class X , CPPDUALS_ONLY_SAME_DEPTH_AS_T(T, X) > |
dual< T > & | operator= (const dual< X > &x) |
|
template<class X , CPPDUALS_ONLY_SAME_DEPTH_AS_T(T, X) > |
dual< T > & | operator+= (const dual< X > &x) |
| Add a dual of the same depth to this dual.
|
|
template<class X , CPPDUALS_ONLY_SAME_DEPTH_AS_T(T, X) > |
dual< T > & | operator-= (const dual< X > &x) |
| Subtract a dual of the same depth from this dual.
|
|
template<class X , CPPDUALS_ONLY_SAME_DEPTH_AS_T(T, X) > |
dual< T > & | operator*= (const dual< X > &x) |
| Multiply this dual with a dual of same depth.
|
|
template<class X , CPPDUALS_ONLY_SAME_DEPTH_AS_T(T, X) > |
dual< T > & | operator/= (const dual< X > &x) |
| Divide this dual by another dual of the same or lower depth.
|
|
template<class T>
class duals::dual< T >
Abstract dual number class. Can nest with other dual numbers and complex numbers.
Definition at line 508 of file dual.