epinowcast
Loading...
Searching...
No Matches
utils.stan
Go to the documentation of this file.
1
26
real
log_dot_product
(vector x, vector y) {
27
return
(log_sum_exp(x + y));
28
}
29
44
int
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
}
num_nonzero
int num_nonzero(matrix x)
Definition
utils.stan:44
log_dot_product
real log_dot_product(vector x, vector y)
Definition
utils.stan:26
functions
utils.stan
Generated by
1.12.0