npgall / concurrent-trees

Concurrent Radix and Suffix Trees for Java
Apache License 2.0
511 stars 82 forks source link

Add tree.size() methods #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 ni...@npgall.com on 3 Dec 2013 at 10:45

GoogleCodeExporter commented 9 years ago
Implemented in trunk. It will be included in the next release.

Original comment by ni...@npgall.com on 3 Dec 2013 at 10:50

GoogleCodeExporter commented 9 years ago

Original comment by ni...@npgall.com on 3 Dec 2013 at 10:51

GoogleCodeExporter commented 9 years ago
Released in 2.4.0.

Original comment by ni...@npgall.com on 3 Dec 2013 at 11:05