itertools::structs

Type Alias Combinations

Source
pub type Combinations<I> = CombinationsGeneric<I, Vec<usize>>;
Expand description

Iterator for Vec valued combinations returned by .combinations()

Aliased Type§

struct Combinations<I> {
    indices: Vec<usize>,
    pool: LazyBuffer<I>,
    first: bool,
}

Fields§

§indices: Vec<usize>§pool: LazyBuffer<I>§first: bool

Implementations§

Source§

impl<I: Iterator> Combinations<I>

Source

pub(crate) fn reset(&mut self, k: usize)

Resets this Combinations back to an initial state for combinations of length k over the same pool data source. If k is larger than the current length of the data pool an attempt is made to prefill the pool so that it holds k elements.