Automatic Differentiation
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches

◆ diff()

template<typename F , typename Theta , typename Stream , typename... Args, require_eigen_vector_vt< std::is_arithmetic, Theta > * = nullptr>
auto stan::math::laplace_likelihood::internal::diff ( F &&  f,
Theta &&  theta,
const Eigen::Index  hessian_block_size,
Stream *  msgs,
Args &&...  args 
)
inline

Computes theta gradient and negative block diagonal Hessian of f wrt theta and args...

Note
If Args contains var types then their adjoints will be calculated as a side effect.
Template Parameters
FA functor with opertor()(Args&&...) returning a scalar
ThetaA class assignable to an Eigen vector type
StreamType of stream for messages.
ArgsType of variadic arguments.
Parameters
fLog likelihood function.
thetaLatent Gaussian model.
hessian_block_sizeIf the Hessian of the log likelihood function w.r.t the latent Gaussian variable is block-diagonal, size of each block.
msgsStream for messages.
argsVariadic arguments for the likelihood function.

Definition at line 128 of file laplace_likelihood.hpp.