![]() |
Sleipnir C++ API
|
#include </home/runner/work/Sleipnir/Sleipnir/include/sleipnir/autodiff/expression.hpp>
Public Member Functions | |
| constexpr | DecisionVariableExpression () |
| Constructs a decision variable expression with a value of zero. | |
| constexpr | DecisionVariableExpression (Scalar value) |
| Scalar | value () const override |
| ExpressionType | type () const override |
| std::string_view | name () const override |
Public Member Functions inherited from slp::detail::Expression< Scalar > | |
| constexpr | Expression ()=default |
| Constructs a constant expression with a value of zero. | |
| constexpr | Expression (Scalar value) |
| constexpr bool | is_constant (Scalar constant) const |
| virtual void | visit_args (function_ref< void(Expression< Scalar > *arg)> func) const |
| virtual void | accumulate_adjoints () const |
| Accumulates the child adjoints as Scalars. | |
| virtual void | accumulate_adjoints_expr () const |
| Accumulates the child adjoints as Expressions. | |
Additional Inherited Members | |
Public Types inherited from slp::detail::Expression< Scalar > | |
| using | Scalar = Scalar |
| Scalar type alias. | |
Public Attributes inherited from slp::detail::Expression< Scalar > | |
| Scalar | val |
| The value of the expression node. | |
| Scalar | adj |
| The adjoint of the expression node, used during autodiff. | |
| ExpressionPtr< Scalar > | adj_expr |
| bool | is_leaf |
| int32_t | scratch |
| uint32_t | ref_count |
| Reference count for intrusive shared pointer. | |
Derived expression type for decision variable.
| Scalar | Scalar type. |
|
inlineexplicitconstexpr |
Constructs a nullary expression (an operator with no arguments).
| value | The expression value. |
|
inlineoverridevirtual |
Returns the name of this expression.
Implements slp::detail::Expression< Scalar >.
|
inlineoverridevirtual |
Returns the type of this expression (constant, linear, quadratic, or nonlinear).
Implements slp::detail::Expression< Scalar >.
|
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.
Implements slp::detail::Expression< Scalar >.