int K = num_elements(theta);
if (theta[1] == negative_infinity())
reject("first element must be finite");
for (k in 2 : K)
if (theta[k] <= theta[k - 1])
reject("bounds and quantiles are not in the right order");
return 1;
}
int in_order(array[] real theta)
Definition: logical_array.stanfunctions:16
◆ in_order()
int in_order |
( |
array[]real |
theta | ) |
|
Checks whether real numbers are finite and ordered.
- Copyright
- Ben Goodrich 2020
- Parameters
-
theta | real array of numbers |
- Exceptions
-
if | real numbers are not finite or not ordered |
- Returns
- 1 if real numbers are finite and ordered