Skip to content

Commit d0aaa69

Browse files
committed
Wrap long reject/print
1 parent 0e34a6a commit d0aaa69

3 files changed

Lines changed: 12 additions & 7 deletions

File tree

knitr/car-iar-poisson/update_2021_02/bym2.stan

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ functions {
3636
*/
3737
real standard_icar_lpdf(vector phi, array[,] int adjacency) {
3838
if (size(adjacency) != 2) {
39-
reject("require 2rows for adjacency array;", " found rows = ", size(
40-
adjacency));
39+
reject("require 2rows for adjacency array;", " found rows = ",
40+
size(adjacency));
4141
}
4242
return soft_ctr_std_icar_lpdf(phi | phi[adjacency[1]], phi[adjacency[2]]);
4343
}

knitr/car-iar-poisson/update_2021_02/bym2_islands.stan

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,16 @@ functions {
3838
int num_edges = dims(adjacency)[2];
3939
int num_comps = size(edge_cts);
4040
if (size(adjacency) != 2) {
41-
reject("require 2 rows for adjacency array;", " found rows = ", size(
42-
adjacency));
41+
reject("require 2 rows for adjacency array;", " found rows = ",
42+
size(adjacency));
4343
}
4444
if (!(num_nodes == dims(node_idxs)[2] && size(node_cts) == size(edge_cts)
4545
&& size(node_cts) == size(node_idxs)
4646
&& size(edge_cts) == size(edge_idxs))) {
47-
reject("arguments have size mismatch, expecting ", num_comps, " rows for node_cts edge_cts, node_idxs, and edge_idxs,", num_nodes, " elements in phi and columns of node_idxs, and ", num_edges, " columns of edge_idxs.");
47+
reject("arguments have size mismatch, expecting ", num_comps,
48+
" rows for node_cts edge_cts, node_idxs, and edge_idxs,",
49+
num_nodes, " elements in phi and columns of node_idxs, and ",
50+
num_edges, " columns of edge_idxs.");
4851
}
4952

5053
real total = 0;

regression_tests/mother.stan

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,12 @@ functions {
211211
abs_diff = fabs(x - y);
212212
avg_scale = (fabs(x) + fabs(y)) / 2;
213213
if ((abs_diff / avg_scale) > max_) {
214-
reject("user-specified rejection, difference above ", max_, " x:", x, " y:", y);
214+
reject("user-specified rejection, difference above ", max_, " x:", x,
215+
" y:", y);
215216
}
216217
if ((abs_diff / avg_scale) < min_) {
217-
reject("user-specified rejection, difference below ", min_, " x:", x, " y:", y);
218+
reject("user-specified rejection, difference below ", min_, " x:", x,
219+
" y:", y);
218220
}
219221
return abs_diff / avg_scale;
220222
}

0 commit comments

Comments
 (0)