pub trait PickyIterator<T: Counter> {
    fn pick(
        &mut self,
        index: usize,
        total_count_to_index: u64,
        count_at_index: T
    ) -> Option<PickMetadata>; fn more(&mut self, index_to_pick: usize) -> bool; }
Expand description

A trait for designing an subset iterator over values in a Histogram.

Required Methods

Return Some if an IterationValue should be emitted at this point.

index is 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.

Should 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() returned Some).

Implementors