![]() |
Sleipnir C++ API
|
#include <sleipnir/autodiff/gradient.hpp>
Public Member Functions | |
| Gradient (Variable< Scalar > variable, Variable< Scalar > wrt) | |
| Gradient (Variable< Scalar > variable, SleipnirMatrixLike< Scalar > auto wrt) | |
| VariableMatrix< Scalar > | get () const |
| const Eigen::SparseVector< Scalar > & | 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.