![]() |
WPILibC++ 2027.0.0-alpha-2
|
This class calculates the Hessian of a variable with respect to a vector of variables. More...
Public Member Functions | |
Hessian (Variable variable, Variable wrt) noexcept | |
Constructs a Hessian object. | |
Hessian (Variable variable, SleipnirMatrixLike auto wrt) noexcept | |
Constructs a Hessian object. | |
VariableMatrix | get () const |
Returns the Hessian as a VariableMatrix. | |
const Eigen::SparseMatrix< double > & | value () |
Evaluates the Hessian at wrt's value. | |
This class calculates the Hessian of a variable with respect to a vector of variables.
The gradient tree is cached so subsequent Hessian calculations are faster, and the Hessian is only recomputed if the variable expression is nonlinear.
UpLo | Which part of the Hessian to compute (Lower or Lower | Upper). |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
Returns the Hessian as a VariableMatrix.
This is useful when constructing optimization problems with derivatives in them.
|
inline |