-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix consensusTree() #441
Fix consensusTree() #441
Conversation
Oh drat. So the iterator version is walking the list in reverse, but my "readable" version is not. It looks like there are 2 other instances where I switched a reverse walk to a forward walk. (i.e. they used |
Ah, so that was it! Feel free to add commits to this branch as needed, of course |
Hmm... I'd like to fix the other 2 cases in this file, and I also think we should add the test case from #361. Instead of just reverting the readability change, I have a way of fixing it. |
b9970b2
to
6768d22
Compare
OK, so I have fixed the bug in a different way, and also addressed the readability of for-loops doing a reverse walk. Basically, anything that was iterating over a When this finishes compiling on my slow laptop, I'm going to check that the we now get the right consensus tree for #361. Would it be possible for you to make a test-case out of this? I'm thinking we need to add a new Does that sound doable for you, or should I do it? |
That sounds doable; I've written tests before. I'll get right on it |
Fixes #361 |
Nice test case. |
Thank you for solving the issue in a much more elegant way! |
This branch reverts one of the readability changes introduced by @bredelings into the
TreeSummary::mrTree()
function in commit 2114c4b. As it turns out, this was the source of issue #361. I have verified that after changing the iterator back to what it was, RevBayes produces the same output as in v1.1.0, i.e., the version which was reported to still work correctly by the author of the issue.Note that I haven't touched any of the other function in
TreeSummary
, many of which had analogous changes made to them. I haven't checked if any of those suffer from similar issues.