Trait PickyIterator
trait PickyIterator<T: Counter>
A trait for designing an subset iterator over values in a Histogram.
Required Methods
fn pick(self: &mut Self, index: usize, total_count_to_index: u64, count_at_index: T) -> Option<PickMetadata>Return
Someif anIterationValueshould be emitted at this point.indexis a valid index in the relevant histogram.This will be called with the same index until it returns
None. This enables modes of iteration that pick different values represented by the same bucket, for instance.fn more(self: &mut Self, index_to_pick: usize) -> boolShould we keep iterating even though the last index with non-zero count has already been picked at least once?
This will be called on every iteration once the last index with non-zero count has been picked, even if the index was not advanced in the last iteration (because
pick()returnedSome).