Derived expression type for cos().
More...
#include </home/runner/work/allwpilib/allwpilib/wpimath/src/main/native/thirdparty/sleipnir/include/sleipnir/autodiff/expression.hpp>
|
| constexpr | CosExpression (ExpressionPtr< Scalar > lhs) |
| | Constructs an unary expression (an operator with one argument).
|
| Scalar | value (Scalar x, Scalar) const override |
| | Either nullary operator with no arguments, unary operator with one argument, or binary operator with two arguments.
|
| ExpressionType | type () const override |
| | Returns the type of this expression (constant, linear, quadratic, or nonlinear).
|
| std::string_view | name () const override |
| | Returns the name of this expression.
|
| Scalar | grad_l (Scalar x, Scalar, Scalar parent_adjoint) const override |
| | Returns ∂/∂l as a Scalar.
|
| ExpressionPtr< Scalar > | grad_expr_l (const ExpressionPtr< Scalar > &x, const ExpressionPtr< Scalar > &, const ExpressionPtr< Scalar > &parent_adjoint) const override |
| | Returns ∂/∂l as an Expression.
|
| constexpr | Expression ()=default |
| | Constructs a constant expression with a value of zero.
|
| virtual | ~Expression ()=default |
| constexpr bool | is_constant (Scalar constant) const |
| | Returns true if the expression is the given constant.
|
| virtual Scalar | grad_r (Scalar lhs, Scalar rhs, Scalar parent_adjoint) const |
| | Returns ∂/∂r as a Scalar.
|
| virtual ExpressionPtr< Scalar > | grad_expr_r (const ExpressionPtr< Scalar > &lhs, const ExpressionPtr< Scalar > &rhs, const ExpressionPtr< Scalar > &parent_adjoint) const |
| | Returns ∂/∂r as an Expression.
|
template<typename
Scalar>
struct slp::detail::CosExpression< Scalar >
Derived expression type for cos().
- Template Parameters
-
◆ CosExpression()
Constructs an unary expression (an operator with one argument).
- Parameters
-
| lhs | Unary operator's operand. |
◆ grad_expr_l()
◆ grad_l()
Returns ∂/∂l as a Scalar.
- Parameters
-
| lhs | Left argument to binary operator. |
| rhs | Right argument to binary operator. |
| parent_adjoint | Adjoint of parent expression. |
- Returns
- ∂/∂l as a Scalar.
Reimplemented from slp::detail::Expression< Scalar >.
◆ name()
◆ type()
◆ value()
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.
- Parameters
-
| lhs | Left argument to binary operator. |
| rhs | Right argument to binary operator. |
- Returns
- The node's value.
Implements slp::detail::Expression< Scalar >.
The documentation for this struct was generated from the following file:
- /home/runner/work/allwpilib/allwpilib/wpimath/src/main/native/thirdparty/sleipnir/include/sleipnir/autodiff/expression.hpp