1#ifndef STAN_MATH_PRIM_PROB_NEG_BINOMIAL_2_LCCDF_HPP
2#define STAN_MATH_PRIM_PROB_NEG_BINOMIAL_2_LCCDF_HPP
16template <
typename T_n,
typename T_location,
typename T_precision>
18 const T_n& n,
const T_location& mu,
const T_precision& phi) {
21 static constexpr const char* function =
"neg_binomial_2_lccdf";
23 mu,
"Precision Parameter", phi);
25 T_phi_ref phi_ref = phi;
36 size_t size_beta =
max_size(mu, phi);
41 for (
size_t i = 0; i < size_beta; ++i) {
42 beta_vec[i] = phi_vec[i] / mu_vec[i];
VectorBuilder allocates type T1 values to be used as intermediate values.
scalar_seq_view provides a uniform sequence-like wrapper around either a scalar or a sequence of scal...
typename return_type< Ts... >::type return_type_t
Convenience type for the return type of the specified template parameters.
bool size_zero(const T &x)
Returns 1 if input is of length 0, returns 0 otherwise.
void check_consistent_sizes(const char *)
Trivial no input case, this function is a no-op.
return_type_t< T_shape, T_inv_scale > neg_binomial_lccdf(const T_n &n, const T_shape &alpha, const T_inv_scale &beta_param)
void check_not_nan(const char *function, const char *name, const T_y &y)
Check if y is not NaN.
int64_t max_size(const T1 &x1, const Ts &... xs)
Calculate the size of the largest input.
return_type_t< T_location, T_precision > neg_binomial_2_lccdf(const T_n &n, const T_location &mu, const T_precision &phi)
void check_positive_finite(const char *function, const char *name, const T_y &y)
Check if y is positive and finite.
typename ref_type_if< true, T >::type ref_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...