40template <
typename Value,
typename Diff>
60template <
typename Value,
typename Diff>
64 const auto val =
exp(x.value());
76template <
typename Value,
typename Diff>
81 x,
log(x.value()),
static_cast<Value
>(1) / x.value());
92template <
typename Value,
typename Diff>
96 const auto val =
sqrt(x.value());
97 const auto half =
static_cast<Value
>(0.5);
Class of variables in forward-mode automatic differentiation kubota1998.
Definition of variable class.
auto process_one_arg_function(const variable< Value, Diff > &arg, const Value &val, const Value &sensitivity) -> variable< Value, Diff >
Process a function with one argument.
Namespace of forward-mode automatic differentiation.
auto exp(const variable< Value, Diff > &x) -> variable< Value, Diff >
Calculate exponential.
auto log(const variable< Value, Diff > &x) -> variable< Value, Diff >
Calculate logarithm.
auto sqrt(const variable< Value, Diff > &x) -> variable< Value, Diff >
Calculate square root.