Multidual number algebra for functions of the form \(f: \mathbb{R}^n \rightarrow \mathbb{R}\).
More...
|
| multidual () |
| Construct a multidual number as \((0 + \vec 0)\).
|
|
| multidual (real r, vec< real, N > u) |
| Construct a multidual number from a real number and an N dimensional vector.
|
|
| multidual (real r) |
| Construct a multidual number from a real number.
|
|
multidual & | operator= (real x) |
| Initialize a multidual number from a real number.
|
|
real | Re () const |
| Get the real part.
|
|
real & | Re () |
| Access the real part.
|
|
vec< real, N > | Dual () const |
| Get the multidual part.
|
|
vec< real, N > & | Dual () |
| Access the multidual part.
|
|
real | Dual (unsigned int i) const |
| Get the i-th element of the multidual part, corresponding to the i-th independent variable in automatic differentiation.
|
|
real & | Dual (unsigned int i) |
| Access the i-th element of the multidual part, corresponding to the i-th independent variable in automatic differentiation.
|
|
multidual | conjugate () const |
| Get the multidual conjugate.
|
|
multidual | inverse () const |
| Get the inverse of a multidual number.
|
|
multidual | operator+ () const |
| Identity (for consistency)
|
|
multidual | operator+ (const multidual &other) const |
| Sum two multidual numbers.
|
|
multidual | operator+ (real r) const |
| Sum a real number to a multidual number.
|
|
multidual | operator- () const |
| Get the opposite of a multidual number.
|
|
multidual | operator- (const multidual &other) const |
| Subtract two multidual numbers.
|
|
multidual | operator- (real r) const |
| Subtract a real number from a multidual number.
|
|
multidual | operator* (const multidual &other) const |
| Multiply two multidual numbers.
|
|
multidual | operator* (real r) const |
| Multiply a multidual number by a real number.
|
|
multidual | operator/ (const multidual &other) const |
| Dual division.
|
|
multidual | operator/ (real r) const |
| Divide a multidual number by a real number.
|
|
multidual & | operator+= (const multidual &other) |
| Sum a real number to this one.
|
|
multidual & | operator+= (real r) |
| Sum a real number to this multidual number.
|
|
multidual & | operator-= (const multidual &other) |
| Subtract a real number from this one.
|
|
multidual & | operator-= (real r) |
| Subtract a real number from this multidual number.
|
|
multidual & | operator*= (const multidual &other) |
| Multiply this multidual number by another one.
|
|
multidual & | operator*= (real r) |
| Multiply this multidual number by a real number.
|
|
multidual & | operator/= (const multidual &other) |
| Divide this multidual number by another one.
|
|
multidual & | operator/= (real r) |
| Divide a multidual number by a real number.
|
|
bool | operator== (const multidual &other) |
| Check whether two multidual numbers have the same real and multidual parts.
|
|
unsigned int | size () const |
| Get the number of independent variables associated with the multidual number.
|
|
void | resize (unsigned int size) |
| Change the size of the dual part of the number (only for dynamically allocated vectors)
|
|
std::string | to_string (const std::string &epsilon="e") const |
| Convert the multidual number to string representation.
|
|
| operator std::string () |
| Convert the multidual number to string representation.
|
|
|
static vec< multidual< N >, N > | make_argument (const vec< real, N > &x) |
| Construct an N-dimensional vector of multidual numbers to be passed as argument to a multidual function.
|
|
static vec< real, N > | extract_real (const vec< multidual< N >, N > &v) |
| Extract the real vector from a vector of multidual numbers as a vec<real, N>
|
|
static mat< real, N, N > | extract_dual (const vec< multidual< N >, N > &v) |
| Extract the dual matrix (Jacobian) from a vector of multidual numbers as a mat<N, N>
|
|
static void | extract (const vec< multidual< N >, N > &v, vec< real, N > &x, mat< real, N, N > &J) |
| Extract the real vector and dual matrix from a vector of multidual numbers as a vec<real, N> and mat<real, N, N>
|
|
template<unsigned int N = 0>
class theoretica::multidual< N >
Multidual number algebra for functions of the form \(f: \mathbb{R}^n \rightarrow \mathbb{R}\).