![]() |
Sleipnir C++ API
|
#include <sleipnir/autodiff/expression.hpp>
Public Member Functions | |
| constexpr | CbrtExpression (ExpressionPtr lhs) |
| double | value (double x, double) const override |
| ExpressionType | type () const override |
| double | grad_l (double x, double, double parent_adjoint) const override |
| ExpressionPtr | grad_expr_l (const ExpressionPtr &x, const ExpressionPtr &, const ExpressionPtr &parent_adjoint) const override |
Public Member Functions inherited from slp::detail::Expression | |
| constexpr | Expression ()=default |
| constexpr | Expression (double value) |
| constexpr | Expression (ExpressionPtr lhs) |
| constexpr | Expression (ExpressionPtr lhs, ExpressionPtr rhs) |
| constexpr bool | is_constant (double constant) const |
| virtual double | grad_r (double lhs, double rhs, double parent_adjoint) const |
| virtual ExpressionPtr | grad_expr_r (const ExpressionPtr &lhs, const ExpressionPtr &rhs, const ExpressionPtr &parent_adjoint) const |
Additional Inherited Members | |
Public Attributes inherited from slp::detail::Expression | |
| double | val = 0.0 |
| The value of the expression node. | |
| double | adjoint = 0.0 |
| The adjoint of the expression node, used during autodiff. | |
| uint32_t | incoming_edges = 0 |
| Counts incoming edges for this node. | |
| int32_t | col = -1 |
| This expression's column in a Jacobian, or -1 otherwise. | |
| ExpressionPtr | adjoint_expr |
| uint32_t | ref_count = 0 |
| Reference count for intrusive shared pointer. | |
| std::array< ExpressionPtr, 2 > | args {nullptr, nullptr} |
| Expression arguments. | |
Derived expression type for cbrt().
|
inlineexplicitconstexpr |
Constructs an unary expression (an operator with one argument).
| lhs | Unary operator's operand. |
|
inlineoverridevirtual |
Returns ∂/∂l as an Expression.
| lhs | Left argument to binary operator. |
| rhs | Right argument to binary operator. |
| parent_adjoint | Adjoint of parent expression. |
Reimplemented from slp::detail::Expression.
|
inlineoverridevirtual |
Returns ∂/∂l as a double.
| lhs | Left argument to binary operator. |
| rhs | Right argument to binary operator. |
| parent_adjoint | Adjoint of parent expression. |
Reimplemented from slp::detail::Expression.
|
inlineoverridevirtual |
Returns the type of this expression (constant, linear, quadratic, or nonlinear).
Implements slp::detail::Expression.
|
inlineoverridevirtual |
Either nullary operator with no arguments, unary operator with one argument, or binary operator with two arguments. This operator is used to update the node's value.
| lhs | Left argument to binary operator. |
| rhs | Right argument to binary operator. |
Implements slp::detail::Expression.