epinowcast
Loading...
Searching...
No Matches
allocate_observed_obs.stan
Go to the documentation of this file.
1
31
vector
allocate_observed_obs
(
int
start,
int
end, vector obs,
32
array[]
int
sl, array[]
int
csl,
33
array[]
int
sdmax, array[]
int
csdmax) {
34
array[3]
int
n =
filt_obs_indexes
(start, end, csl, sl);
35
vector[n[3]] alloc_obs;
36
for
(i in start:end) {
37
array[3]
int
l =
filt_obs_indexes
(i, i, csl, sl);
38
array[3]
int
f =
filt_obs_indexes
(i, i, csdmax, sdmax);
39
alloc_obs[l[1]:l[2]] = segment(obs, f[1], sl[i]);
40
}
41
return
(alloc_obs);
42
}
43
44
array[]
int
allocate_observed_obs
(
int
start,
int
end, array[]
int
obs,
45
array[]
int
sl, array[]
int
csl,
46
array[]
int
sdmax, array[]
int
csdmax) {
47
array[3]
int
n =
filt_obs_indexes
(start, end, csl, sl);
48
array[n[3]]
int
alloc_obs;
49
for
(i in start:end) {
50
array[3]
int
l =
filt_obs_indexes
(i, i, csl, sl);
51
array[3]
int
f =
filt_obs_indexes
(i, i, csdmax, sdmax);
52
alloc_obs[l[1]:l[2]] = segment(obs, f[1], sl[i]);
53
}
54
return
(alloc_obs);
55
}
allocate_observed_obs
vector allocate_observed_obs(int start, int end, vector obs, array[] int sl, array[] int csl, array[] int sdmax, array[] int csdmax)
Definition
allocate_observed_obs.stan:31
filt_obs_indexes
array[] int filt_obs_indexes(int start, int end, array[] int csl, array[] int sl)
Definition
filt_obs_indexes.stan:25
functions
allocate_observed_obs.stan
Generated by
1.9.8