From f1fdbdfc76b98c0bdd20166d7cb5080c5be936c6 Mon Sep 17 00:00:00 2001 From: jhellewell14 Date: Wed, 4 Dec 2024 14:48:15 +0000 Subject: [PATCH] Was not using rate matrix values after it had potentially been updated by a TreeMove --- src/treestate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/treestate.rs b/src/treestate.rs index 0251256..73cffd7 100644 --- a/src/treestate.rs +++ b/src/treestate.rs @@ -135,8 +135,8 @@ impl<'a, R: RateMatrix + 'a, M: TreeMove> Iterator for TreeStateIter<'a, R, M } let old_ll = self.ts.ll.unwrap(); - let rate_mat = self.ts.mat.get_matrix(); let mut new_ts = self.move_fn.generate(&self.ts); + let rate_mat = new_ts.mat.get_matrix(); if new_ts.changed_nodes.is_none() { return Some(new_ts)