Skip to content
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

Dynamic bp tree #490

Merged
merged 6 commits into from
Mar 10, 2021
Merged

Dynamic bp tree #490

merged 6 commits into from
Mar 10, 2021

Conversation

kwcantrell
Copy link
Collaborator

This PR implements a shear method for the bp tree that is based on https://github.com/wasade/improved-octo-waddle/blob/master/bp/_bp.pyx#L732

@wasade if you can take a look at this that would be awesome!

Copy link
Member

@ElDeveloper ElDeveloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @kwcantrell, I just added a few small comments.

deepEqual(result.b_, [1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0]);
deepEqual(result.names_, [null, "7", "10", "11", "9", "8", "r"]);
deepEqual(result.lengths_, [null, 6, 7, 8, 9, 10, 11]);
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kwcantrell can you add a test case for when all tips are removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test added


// get name and length of node
// Note: names and lengths of nodes are stored in postorder

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@@ -971,5 +971,64 @@ define(["ByteArray", "underscore"], function (ByteArray, _) {
return this._nameToNodes[name];
};

/**
* tips - Set
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fill the rest of the documentation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc added

@wasade
Copy link
Member

wasade commented Mar 10, 2021

This looks awesome!!! +1

@ElDeveloper
Copy link
Member

Thanks so much @wasade. @kwcantrell, it looks like there's only a handful of comments from my review but otherwise this should be good to be merged.

@ElDeveloper
Copy link
Member

Thanks @kwcantrell

@ElDeveloper ElDeveloper merged commit 07bba1b into biocore:master Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants