Loading [MathJax]/extensions/TeX/AMSsymbols.js
Automatic Differentiation
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches

◆ hessian_block_diag()

template<typename F , typename... Args>
Eigen::SparseMatrix< double > stan::math::hessian_block_diag ( F &&  f,
const Eigen::VectorXd &  x,
const Eigen::Index  hessian_block_size,
Args &&...  args 
)
inline

Returns a block diagonal Hessian by computing the relevant directional derivatives and storing them in a matrix.

For m the size of each block, the operations const m calls to hessian_times_vector, that is m forward sweeps and m reverse sweeps.

Template Parameters
FType of function to differentiate.
EtaType of additional arguments passed to F.
ArgsType of variadic arguments passed to F.
Parameters
fFunction to differentiate.
xArguments with respect to which we differentiate.
etaAdditional arguments for f.
hessian_block_size
argsAdditional variadic arguments for f.

Definition at line 25 of file hessian_block_diag.hpp.