21  int s_minus_ylen = s - ylen;
 
   22  int start_x = max(1, s_minus_ylen + 1);
 
   24  int start_y = max(1, 1 - s_minus_ylen);
 
   26  return {start_x, end_x, start_y, end_y};
 
 
   40  int s_minus_ylen = s - ylen;
 
   41  int start_x = max(1, s_minus_ylen + 1);
 
   43  int start_y = max(1, 1 - s_minus_ylen);;
 
   44  int end_y = ylen + xlen - s;
 
   45  return {start_x, end_x, start_y, end_y};
 
 
   63  int xlen = num_elements(x);
 
   64  int ylen = num_elements(y);
 
   67  if (xlen + ylen - 1 < len) {
 
   68    reject(
"convolve_with_rev_pmf: len is longer than x and y convolved");
 
   72    reject(
"convolve_with_rev_pmf: len is shorter than x");
 
   77    z[s] = dot_product(x[indices[1]:indices[2]], y[indices[3]:indices[4]]);
 
   81    for (s in (xlen + 1):len) {
 
   83      z[s] = dot_product(x[indices[1]:indices[2]], y[indices[3]:indices[4]]);
 
 
  106                          vector delay_rev_pmf,
 
  108  int t = num_elements(infections);
 
  109  int delays = num_elements(delay_rev_pmf);
 
  112    return infections[(seeding_time + 1):t];
 
  116  return unobs_reports[(seeding_time + 1):t];
 
 
vector convolve_with_rev_pmf(vector x, vector y, int len)
 
array[] int calc_conv_indices_len(int s, int xlen, int ylen)
 
vector convolve_to_report(vector infections, vector delay_rev_pmf, int seeding_time)
 
array[] int calc_conv_indices_xlen(int s, int xlen, int ylen)