Skip to content

Commit efad089

Browse files
duncanMRmergify[bot]
authored andcommitted
Update basic tree positioning functions with tree_pos versions
1 parent 2838a69 commit efad089

File tree

4 files changed

+97
-247
lines changed

4 files changed

+97
-247
lines changed

c/tskit/haplotype_matching.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* MIT License
33
*
4-
* Copyright (c) 2019-2023 Tskit Developers
4+
* Copyright (c) 2019-2024 Tskit Developers
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -310,11 +310,7 @@ tsk_ls_hmm_update_tree(tsk_ls_hmm_t *self, int direction)
310310
tsk_id_t u, c, p, j, e;
311311
tsk_value_transition_t *vt;
312312

313-
if (direction == TSK_DIR_FORWARD) {
314-
tsk_tree_position_next(&self->tree_pos);
315-
} else {
316-
tsk_tree_position_prev(&self->tree_pos);
317-
}
313+
tsk_tree_position_step(&self->tree_pos, direction);
318314
tsk_bug_assert(self->tree_pos.index != -1);
319315
tsk_bug_assert(self->tree_pos.index == self->tree.index);
320316

0 commit comments

Comments
 (0)