Sleipnir C++ API
|
#include <sleipnir/autodiff/Gradient.hpp>
Public Member Functions | |
Gradient (Variable variable, Variable wrt) noexcept | |
Gradient (Variable variable, const VariableMatrix &wrt) noexcept | |
VariableMatrix | Get () const |
const Eigen::SparseVector< double > & | Value () |
Profiler & | GetProfiler () |
This class calculates the gradient of a a variable with respect to a vector of variables.
The gradient is only recomputed if the variable expression is quadratic or higher order.
|
inlinenoexcept |
|
inline |
Returns the gradient as a VariableMatrix.
This is useful when constructing optimization problems with derivatives in them.
|
inline |
Returns the profiler.
Evaluates the gradient at wrt's value.