EpiNow2 Stan Functions
helpers.stan
Go to the documentation of this file.
1int to_next_int_index(real x) {
2 if (x<0) {
3 reject("to_next_int_index: x must be non-negative");
4 }
5 real x_rounded = round(x);
6 int i = 1;
7 while (x_rounded > 1) {
8 x_rounded -= 1;
9 i += 1;
10 }
11 return(i);
12}
int to_next_int_index(real x)
Definition helpers.stan:1