Skip to content

Commit

Permalink
Update basic tree positioning functions with tree_pos versions
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanMR committed Feb 9, 2024
1 parent b4c47ea commit 895abed
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 244 deletions.
8 changes: 2 additions & 6 deletions c/tskit/haplotype_matching.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2019-2023 Tskit Developers
* Copyright (c) 2019-2024 Tskit Developers
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -310,11 +310,7 @@ tsk_ls_hmm_update_tree(tsk_ls_hmm_t *self, int direction)
tsk_id_t u, c, p, j, e;
tsk_value_transition_t *vt;

if (direction == TSK_DIR_FORWARD) {
tsk_tree_position_next(&self->tree_pos);
} else {
tsk_tree_position_prev(&self->tree_pos);
}
tsk_tree_position_step(&self->tree_pos, direction);
tsk_bug_assert(self->tree_pos.index != -1);
tsk_bug_assert(self->tree_pos.index == self->tree.index);

Expand Down
Loading

0 comments on commit 895abed

Please sign in to comment.