TMB Documentation
v1.9.11
|
Decomposition of computational graph. More...
#include <TMBad.hpp>
Public Member Functions | |
Decomp3< ADFun > | HesFun (std::vector< bool > keep_rc=std::vector< bool >(0), bool sparse_1=true, bool sparse_2=true, bool sparse_3=true) |
Calculate a sparse plus low rank representation of the Hessian. More... | |
Decomposition of computational graph.
This structure holds a decomposition (f,g) of a computational graph of the form x -> f(x, g(x)) mapping R^n to R^m.
|
inline |
Calculate a sparse plus low rank representation of the Hessian.
Recall that the present object represents a composition f(x, g(x)). Its Hessian is a sum of five terms:
\[ \nabla_x^2 f(x, g(x)) = f''_{xx}(x, g(x)) + f''_{xy}(x, g(x)) g'(x) + g'(x) f''_{yx}(x, g(x)) + f'_y(x, g(x)) g''(x) + g'(x) f''_{yy}(x, g(x)) g'(x) \]
The result is a structure of three components
keep_rc | Rows/cols to keep. If used this mask selects a subset of x. |
sparse_1 | Return sparse first component |
sparse_2 | Return sparse second component |
sparse_3 | Return sparse third component |