![]() |
WPILibC++ 2027.0.0-alpha-4
|
This class calculates the gradient of a variable with respect to a vector of variables. More...
Public Member Functions | |
| Gradient (Variable< Scalar > variable, Variable< Scalar > wrt) | |
| Constructs a Gradient object. | |
| Gradient (Variable< Scalar > variable, SleipnirMatrixLike< Scalar > auto wrt) | |
| Constructs a Gradient object. | |
| VariableMatrix< Scalar > | get () const |
| Returns the gradient as a VariableMatrix. | |
| const Eigen::SparseVector< Scalar > & | value () |
| Evaluates the gradient at wrt's value. | |
This class calculates the gradient of a variable with respect to a vector of variables.
The gradient is only recomputed if the variable expression is quadratic or higher order.
| Scalar | Scalar type. |
|
inline |
|
inline |
|
inline |
Returns the gradient as a VariableMatrix.
This is useful when constructing optimization problems with derivatives in them.
|
inline |
Evaluates the gradient at wrt's value.