|
limes 3.1.0
Composable Calculus Expressions for C++20
|
Fluent builder for computing symbolic derivatives. More...
#include <derivative_builder.hpp>
Public Types | |
| using | value_type = typename E::value_type |
| using | expr_type = E |
Public Member Functions | |
| constexpr | DerivativeBuilder (E e) noexcept |
| template<std::size_t Dim> | |
| constexpr auto | wrt () const |
| Compute ∂/∂x_Dim and return a new builder for chaining. | |
| template<std::size_t D1, std::size_t D2> | |
| constexpr auto | wrt () const |
| Compute ∂²/∂x_D1 ∂x_D2 (convenience for second-order mixed partials) | |
| template<std::size_t D1, std::size_t D2, std::size_t D3> | |
| constexpr auto | wrt () const |
| Compute ∂³/∂x_D1 ∂x_D2 ∂x_D3 (convenience for third-order mixed partials) | |
| constexpr auto | gradient () const |
| Returns tuple<∂f/∂x₀, ∂f/∂x₁, ..., ∂f/∂x_{n-1}> | |
| constexpr E | get () const noexcept |
| Allow implicit conversion to the underlying derivative expression. | |
| constexpr value_type | eval (std::span< value_type const > args) const |
| Evaluate the derivative expression. | |
| constexpr value_type | evaluate (std::span< value_type const > args) const |
| Deprecated: use eval() instead. | |
| std::string | to_string () const |
| String representation. | |
| template<std::size_t Dim> | |
| constexpr auto | derivative () const |
| Further differentiation through the member function. | |
Public Attributes | |
| E | expr |
Static Public Attributes | |
| static constexpr std::size_t | arity_v = E::arity_v |
| Arity of the derivative expression. | |
Fluent builder for computing symbolic derivatives.
DerivativeBuilder wraps an expression and provides chainable methods for computing partial derivatives. Derivatives are computed symbolically at compile time using the chain rule.
| E | The expression type being differentiated |
Definition at line 79 of file derivative_builder.hpp.
| using limes::expr::DerivativeBuilder< E >::expr_type = E |
Definition at line 81 of file derivative_builder.hpp.
| using limes::expr::DerivativeBuilder< E >::value_type = typename E::value_type |
Definition at line 80 of file derivative_builder.hpp.
|
inlineconstexprnoexcept |
Definition at line 85 of file derivative_builder.hpp.
|
inlineconstexpr |
Further differentiation through the member function.
Definition at line 147 of file derivative_builder.hpp.
References limes::expr::DerivativeBuilder< E >::expr.
|
inlineconstexpr |
Evaluate the derivative expression.
Definition at line 127 of file derivative_builder.hpp.
References limes::expr::DerivativeBuilder< E >::expr.
Referenced by limes::expr::DerivativeBuilder< E >::evaluate().
|
inlineconstexpr |
Deprecated: use eval() instead.
Definition at line 133 of file derivative_builder.hpp.
References limes::expr::DerivativeBuilder< E >::eval().
|
inlineconstexprnoexcept |
Allow implicit conversion to the underlying derivative expression.
Definition at line 124 of file derivative_builder.hpp.
References limes::expr::DerivativeBuilder< E >::expr.
|
inlineconstexpr |
Returns tuple<∂f/∂x₀, ∂f/∂x₁, ..., ∂f/∂x_{n-1}>
Definition at line 115 of file derivative_builder.hpp.
|
inline |
String representation.
Definition at line 138 of file derivative_builder.hpp.
References limes::expr::DerivativeBuilder< E >::expr.
|
inlineconstexpr |
Compute ∂/∂x_Dim and return a new builder for chaining.
Definition at line 93 of file derivative_builder.hpp.
References limes::expr::DerivativeBuilder< E >::expr.
|
inlineconstexpr |
Compute ∂²/∂x_D1 ∂x_D2 (convenience for second-order mixed partials)
Definition at line 100 of file derivative_builder.hpp.
|
inlineconstexpr |
Compute ∂³/∂x_D1 ∂x_D2 ∂x_D3 (convenience for third-order mixed partials)
Definition at line 106 of file derivative_builder.hpp.
|
staticconstexpr |
Arity of the derivative expression.
Definition at line 143 of file derivative_builder.hpp.
| E limes::expr::DerivativeBuilder< E >::expr |
Definition at line 83 of file derivative_builder.hpp.
Referenced by limes::expr::DerivativeBuilder< E >::derivative(), limes::expr::DerivativeBuilder< E >::eval(), limes::expr::DerivativeBuilder< E >::get(), limes::expr::DerivativeBuilder< E >::to_string(), and limes::expr::DerivativeBuilder< E >::wrt().