The Google Collections contains an interface Multisetand a class TreeMultiset, but I was surprised to find that there are no matching ones SortedMultiset.
Something like this would be very useful for modeling discrete probability distributions.
Before I try to implement it myself, I would like to know if there is any specific reason for its exclusion, for example. probable violation of invariants Multisetor Collectionor inherent performance problems, etc.
Edit : I did not understand this from the beginning, but actually these are three separate requests:
- Changing the return type of one method (
TreeMultiset.entrySet) - New interface to match existing features
TreeMultiset - A new pair of methods for summing counters in tree branches
finnw source
share