topset-0.3.0 has been yanked.
Top N selector
This crate provides a topset which selects a given number of greatest items. The criterium used to sort the items could be specified as a closure. It is based internally on a binary heap with a fixed size.
Top N iterator
This is convenient way to build an iterator around the N greatest items of a collection.
Note: the returned items are unsorted.
use TopIter;
will produce (possibly in an different order):
in the top 4: 7
in the top 4: 8
in the top 4: 9
in the top 4: 8
in the last 4: 4
in the last 4: 3
in the last 4: 1
in the last 4: 2
Top N set
Instead of manipulation an iterator, this provides a set containing the N greatest items.