Fix tree splitting so as to be robust to node rotation and visit order
Jeet Sukumaran
Branch: jeetsukumaran/biolite:agalma-issue-207
Branch: caseywdunn/biolite:agalma-issue-207
Merged
Merged pull request
Merged in jeetsukumaran/biolite/agalma-issue-207 (pull request #3)
The tests pass! But ...
Unfortunately, the logic is pretty inefficient. I am sure it can be improved so as to avoid the multiple nested iterations over leaf sets as we build them up. But let it serve now as a reference implementation which can be optimized if the performance starts to drop off. Let me know if this is the case, and I can revisit it.