![]() |
Sleipnir C++ API
|
#include <sleipnir/autodiff/hessian.hpp>
Public Member Functions | |
Hessian (Variable variable, Variable wrt) noexcept | |
Hessian (Variable variable, SleipnirMatrixLike auto wrt) noexcept | |
VariableMatrix | get () const |
const Eigen::SparseMatrix< double > & | value () |
const small_vector< SolveProfiler > & | get_profilers () const |
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 |
Returns the profilers.
|
inline |