-
-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some fixes and a cleaner, more general and more efficient t.ladderize().
Added "topological" argument to allow for a ladderization with respect to the actual branch lengths or the number of descendants, in accordance to other functions that have the same "topological" argument. The old function did a strange ladderization when comparing a node with few but distant descendants with a node with many shallow descendants (which would appear after, not really looking like a ladder). That had to do with using "sum" instead of "max". This version fixes it. This version does not return a value (which makes no sense to the user that called the function). Also, it is iterative instead of recursive, so more efficient and cannot have a max recursion error. And it frees memory as it goes, so should work well even for huge trees.
- Loading branch information
Showing
2 changed files
with
25 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters