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

Add tree.size() methods #8

Open
GoogleCodeExporter opened this issue Jul 3, 2015 · 3 comments
Open

Add tree.size() methods #8

GoogleCodeExporter opened this issue Jul 3, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Currently..

    Iterables.count(myTree.getValuesForClosestKeys(""))

..can be used to count the number of keys/values in the radix tree.

This ticket is to add a size() method to the trees, to simplify this, and also 
it may be more efficient than to calculate size as above.

Note that calculating the size of a radix tree is an expensive operation having 
O(n) time complexity. However the method may be useful for debugging purposes.

Original issue reported on code.google.com by [email protected] on 3 Dec 2013 at 10:45

@GoogleCodeExporter
Copy link
Author

Implemented in trunk. It will be included in the next release.

Original comment by [email protected] on 3 Dec 2013 at 10:50

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 3 Dec 2013 at 10:51

  • Changed title: Add tree.size() methods

@GoogleCodeExporter
Copy link
Author

Released in 2.4.0.

Original comment by [email protected] on 3 Dec 2013 at 11:05

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant