Automatic Differentiation
 
Loading...
Searching...
No Matches
laplace_latent_rng.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_MIX_PROB_LAPLACE_LATENT_RNG_HPP
2#define STAN_MATH_MIX_PROB_LAPLACE_LATENT_RNG_HPP
3
7
8namespace stan {
9namespace math {
10
34template <typename LLFunc, typename LLArgs, typename CovarFun,
35 typename CovarArgs, typename OpsTuple, typename RNG>
36inline auto laplace_latent_tol_rng(LLFunc&& L_f, LLArgs&& ll_args,
37 int hessian_block_size,
38 CovarFun&& covariance_function,
39 CovarArgs&& covar_args, OpsTuple&& ops,
40 RNG& rng, std::ostream* msgs) {
41 auto options
42 = internal::tuple_to_laplace_options(std::forward<OpsTuple>(ops));
43 options.hessian_block_size = hessian_block_size;
44 return laplace_base_rng(
45 std::forward<LLFunc>(L_f), std::forward<LLArgs>(ll_args),
46 std::forward<CovarFun>(covariance_function),
47 std::forward<CovarArgs>(covar_args), std::move(options), rng, msgs);
48}
49
70template <typename LLFunc, typename LLArgs, typename CovarFun,
71 typename CovarArgs, typename RNG>
72inline auto laplace_latent_rng(LLFunc&& L_f, LLArgs&& ll_args,
73 int hessian_block_size,
74 CovarFun&& covariance_function,
75 CovarArgs&& covar_args, RNG& rng,
76 std::ostream* msgs) {
77 auto options = laplace_options_default{hessian_block_size};
78 return laplace_base_rng(
79 std::forward<LLFunc>(L_f), std::forward<LLArgs>(ll_args),
80 std::forward<CovarFun>(covariance_function),
81 std::forward<CovarArgs>(covar_args), options, rng, msgs);
82}
83
84} // namespace math
85} // namespace stan
86
87#endif
constexpr auto tuple_to_laplace_options(Options &&ops)
Eigen::VectorXd laplace_base_rng(LLFunc &&ll_fun, LLArgs &&ll_args, CovarFun &&covariance_function, CovarArgs &&covar_args, const laplace_options< InitTheta > &options, RNG &rng, std::ostream *msgs)
In a latent gaussian model,.
auto laplace_latent_tol_rng(LLFunc &&L_f, LLArgs &&ll_args, int hessian_block_size, CovarFun &&covariance_function, CovarArgs &&covar_args, OpsTuple &&ops, RNG &rng, std::ostream *msgs)
In a latent gaussian model,.
auto laplace_latent_rng(LLFunc &&L_f, LLArgs &&ll_args, int hessian_block_size, CovarFun &&covariance_function, CovarArgs &&covar_args, RNG &rng, std::ostream *msgs)
In a latent gaussian model,.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...