Skip to content

Commit

Permalink
hit one more line
Browse files Browse the repository at this point in the history
  • Loading branch information
petrelharp committed Sep 26, 2024
1 parent e6bbbb6 commit 8e9c7cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 9 additions & 0 deletions c/tests/test_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -2065,6 +2065,15 @@ verify_genetic_relatedness_vector(
ts, num_weights, weights, num_windows, windows, result, 0);
CU_ASSERT_EQUAL_FATAL(ret, 0);

windows[0] = windows[1] / 2;
if (num_windows > 1) {
windows[num_windows - 1]
= windows[num_windows - 2] + (L / (double) (2 * num_windows));
}
ret = tsk_treeseq_genetic_relatedness_vector(
ts, num_weights, weights, num_windows, windows, result, 0);
CU_ASSERT_EQUAL_FATAL(ret, 0);

ret = tsk_treeseq_genetic_relatedness_vector(
ts, num_weights, weights, num_windows, windows, result, TSK_STAT_NONCENTRED);
CU_ASSERT_EQUAL_FATAL(ret, 0);
Expand Down
3 changes: 1 addition & 2 deletions c/tskit/trees.c
Original file line number Diff line number Diff line change
Expand Up @@ -10214,8 +10214,7 @@ tsk_matvec_calculator_run(tsk_matvec_calculator_t *self)

for (j = (tsk_size_t) tree_pos.in.start; j != (tsk_size_t) tree_pos.in.stop; j++) {
e = in_order[j];
// note that edge_left[e] <= self->position is always true
// since we are starting from the empty sequence
tsk_bug_assert(edge_left[e] <= self->position);
if (self->position < edge_right[e]) {
p = edge_parent[e];
c = edge_child[e];
Expand Down

0 comments on commit 8e9c7cf

Please sign in to comment.