Struct restricted_tuple::Generator [] [src]

pub struct Generator<'a, T: 'a + Clone> { /* fields omitted */ }

Generator for yielding restricted tuple

Methods

impl<'a, T: 'a + Clone> Generator<'a, T>
[src]

Creates a generator.

Example

let sets: Vec<Vec<u32>> = vec![vec![10, 20], vec![30, 40]];
let mut cache = CountingFunctionCache::new();
let generator = Generator::new(&mut cache, &sets);

Generates a restricted tuple with given length and value.

Panics

Panics when no restricted tuple can be generated. This could happen if the length is smaller than the number of sets, or if there is any empty set in the provided sets, or the provided sets itself is empty.

Trait Implementations

impl<'a, T: Clone + 'a + Clone> Clone for Generator<'a, T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more