Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ diff_eta_implicit()

template<typename F , typename V_t , typename Theta , typename Stream , typename... Args, require_eigen_vector_t< Theta > * = nullptr>
auto stan::math::laplace_likelihood::internal::diff_eta_implicit ( F &&  f,
V_t &&  v,
Theta &&  theta,
Stream *  msgs,
Args &&...  args 
)
inline

Compute second order gradient of f wrt theta and args...

Note
See proposition 2 in https://arxiv.org/pdf/2306.14976 See lines 31-37 in Algorithm 4 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
V_tA type assignable to an Eigen vector type
ThetaA type assignable to an Eigen vector type
StreamType of stream for messages.
ArgsParameter pack of arguments to F's operator()
Parameters
fLog likelihood function.
vInitial tangent.
thetaLatent Gaussian variable.
msgsStream for messages.
argsVariadic arguments for likelhood function.
Returns
args which are var types will have their adjoints set as a side effect of this function.

Definition at line 276 of file laplace_likelihood.hpp.