epinowcast
Loading...
Searching...
No Matches
utils.stan
Go to the documentation of this file.
1
26real log_dot_product(vector x, vector y) {
27 return(log_sum_exp(x + y));
28}
29
44int num_nonzero(matrix x) {
45 int n = 0;
46 for (k in 1:rows(x)) {
47 for (l in 1:cols(x)) {
48 if (x[k, l] != 0) {
49 n = n + 1;
50 }
51 }
52 }
53 return(n);
54}
int num_nonzero(matrix x)
Definition utils.stan:44
real log_dot_product(vector x, vector y)
Definition utils.stan:26