![]() |
Sleipnir C++ API
|
#include <sleipnir/autodiff/expression.hpp>
Public Member Functions | |
Log10Expression (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 |
![]() | |
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 | |
![]() | |
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 std::log10().
|
inlineexplicit |
Constructs an unary expression (an operator with one argument).
lhs | Unary operator's operand. |
|
inlineoverridevirtual |
Returns Expression adjoint of the left child 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 double adjoint of the left child 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 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.