-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for var_value<Matrix> for univariate distributions #2304
Changes from all commits
e99e1f8
3a92428
e625777
d0c2d4b
5eae85c
e7dc4b3
259bc73
cd86fc5
17b6b6d
1058731
c77799b
d488d68
d02ad05
e7668fc
e64bdc3
d3da2bc
38874d1
2933d92
05ed31c
85b52bd
d2eec67
daff60a
dd3f0f8
034d009
9482b54
0dd58c2
4114b9a
7c2c8dd
86611b7
ac312e2
5dfbb26
46e49f8
57d4438
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,9 +51,10 @@ return_type_t<T_prob> binomial_lpmf(const T_n& n, const T_N& N, | |
T_N_ref N_ref = N; | ||
T_theta_ref theta_ref = theta; | ||
|
||
check_bounded(function, "Successes variable", n_ref, 0, N_ref); | ||
check_bounded(function, "Successes variable", value_of(n_ref), 0, N_ref); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Integer |
||
check_nonnegative(function, "Population size parameter", N_ref); | ||
check_bounded(function, "Probability parameter", theta_ref, 0.0, 1.0); | ||
check_bounded(function, "Probability parameter", value_of(theta_ref), 0.0, | ||
1.0); | ||
|
||
if (size_zero(n, N, theta)) { | ||
return 0.0; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ template <bool propto, typename T_n, typename T_N, typename T_a, typename T_b> | |
double hypergeometric_lpmf(const T_n& n, const T_N& N, const T_a& a, | ||
const T_b& b) { | ||
static const char* function = "hypergeometric_lpmf"; | ||
check_bounded(function, "Successes variable", n, 0, a); | ||
check_bounded(function, "Successes variable", value_of(n), 0, a); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Integer |
||
check_consistent_sizes(function, "Successes variable", n, "Draws parameter", | ||
N, "Successes in population parameter", a, | ||
"Failures in population parameter", b); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ inline int hypergeometric_rng(int N, int a, int b, RNG& rng) { | |
using boost::variate_generator; | ||
using boost::math::hypergeometric_distribution; | ||
static const char* function = "hypergeometric_rng"; | ||
check_bounded(function, "Draws parameter", N, 0, a + b); | ||
check_bounded(function, "Draws parameter", value_of(N), 0, a + b); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Integer |
||
check_positive(function, "Draws parameter", N); | ||
check_positive(function, "Successes in population parameter", a); | ||
check_positive(function, "Failures in population parameter", b); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integer