40template <
typename Scalar>
59template <
typename Scalar>
62 const auto val =
exp(x.value());
73template <
typename Scalar>
77 x,
log(x.value()),
static_cast<Scalar
>(1) / x.value());
87template <
typename Scalar>
90 const auto val =
sqrt(x.value());
91 const auto half =
static_cast<Scalar
>(0.5);
Definition of node class.
Class of variables in backward-mode automatic differentiation kubota1998.
auto create_node(Args &&... args) -> node_ptr< Scalar >
Create a node.
auto process_one_arg_function(const variable< Scalar > &arg, const Scalar &val, const Scalar &sensitivity) -> variable< Scalar >
Process a function with one argument.
Namespace of backward-mode automatic differentiation.
auto sqrt(const variable< Scalar > &x) -> variable< Scalar >
Calculate square root.
auto exp(const variable< Scalar > &x) -> variable< Scalar >
Calculate exponential.
auto log(const variable< Scalar > &x) -> variable< Scalar >
Calculate logarithm.
Definition of node class.