Automatic Differentiation
 
Loading...
Searching...
No Matches
laplace_latent_neg_binomial_2_log_rng.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_MIX_PROB_LAPLACE_LATENT_NEG_BINOMIAL_2_LOG_RNG_HPP
2#define STAN_MATH_MIX_PROB_LAPLACE_LATENT_NEG_BINOMIAL_2_LOG_RNG_HPP
3
7
8namespace stan {
9namespace math {
10
41template <typename Eta, typename Mean, typename CovarFun, typename CovarArgs,
42 typename OpsTuple, typename RNG>
44 const std::vector<int>& y, const std::vector<int>& y_index, Eta&& eta,
45 Mean&& mean, int hessian_block_size, CovarFun&& covariance_function,
46 CovarArgs&& covar_args, OpsTuple&& ops, RNG& rng, std::ostream* msgs) {
47 auto options
48 = internal::tuple_to_laplace_options(std::forward<OpsTuple>(ops));
49 options.hessian_block_size = hessian_block_size;
50 return laplace_base_rng(
52 std::forward_as_tuple(std::forward<Eta>(eta), y, y_index,
53 std::forward<Mean>(mean)),
54 std::forward<CovarFun>(covariance_function),
55 std::forward<CovarArgs>(covar_args), std::move(options), rng, msgs);
56}
57
85template <typename Eta, typename Mean, typename CovarFun, typename CovarArgs,
86 typename RNG>
88 const std::vector<int>& y, const std::vector<int>& y_index, Eta&& eta,
89 Mean&& mean, int hessian_block_size, CovarFun&& covariance_function,
90 CovarArgs&& covar_args, RNG& rng, std::ostream* msgs) {
91 auto options = laplace_options_default{hessian_block_size};
92 return laplace_base_rng(
94 std::forward_as_tuple(std::forward<Eta>(eta), y, y_index,
95 std::forward<Mean>(mean)),
96 std::forward<CovarFun>(covariance_function),
97 std::forward<CovarArgs>(covar_args), options, rng, msgs);
98}
99
100} // namespace math
101} // namespace stan
102
103#endif
constexpr auto tuple_to_laplace_options(Options &&ops)
scalar_type_t< T > mean(const T &m)
Returns the sample mean (i.e., average) of the coefficients in the specified std vector,...
Definition mean.hpp:20
auto 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,.
Eigen::VectorXd laplace_latent_neg_binomial_2_log_rng(const std::vector< int > &y, const std::vector< int > &y_index, Eta &&eta, Mean &&mean, int hessian_block_size, CovarFun &&covariance_function, CovarArgs &&covar_args, RNG &rng, std::ostream *msgs)
In a latent gaussian model,.
Eigen::VectorXd laplace_latent_tol_neg_binomial_2_log_rng(const std::vector< int > &y, const std::vector< int > &y_index, Eta &&eta, Mean &&mean, int hessian_block_size, CovarFun &&covariance_function, CovarArgs &&covar_args, OpsTuple &&ops, 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 ...