pub fn exhaustive_vecs_min_length<I: Clone + Iterator>(
    min_length: u64,
    xs: I
) -> ExhaustiveVecs<I::Item, PrimitiveIntIncreasingRange<u64>, I>Notable traits for ExhaustiveVecs<T, I, J>impl<T: Clone, I: Iterator<Item = u64>, J: Clone + Iterator<Item = T>> Iterator for ExhaustiveVecs<T, I, J> type Item = Vec<T>; where
    I::Item: Clone
Expand description

Generates all Vecs with a minimum length and with elements from a specified iterator.

If xs is empty and min_length is 0, the output length is 1; if xs is empty and min_length is greater than 0, the output is empty; otherwise, the output is infinite.

The lengths of the output Vecs grow logarithmically.

Examples

extern crate itertools;

use itertools::Itertools;
use malachite_base::num::exhaustive::exhaustive_unsigneds;
use malachite_base::vecs::exhaustive::exhaustive_vecs_min_length;

let xss = exhaustive_vecs_min_length(2, exhaustive_unsigneds::<u32>())
    .take(20)
    .collect_vec();
assert_eq!(
    xss.iter().map(Vec::as_slice).collect_vec().as_slice(),
    &[
        &[0, 0][..],
        &[0, 0, 0],
        &[0, 1],
        &[0, 0, 0, 0],
        &[1, 0],
        &[0, 0, 1],
        &[1, 1],
        &[0, 0, 0, 0, 0],
        &[0, 2],
        &[0, 1, 0],
        &[0, 3],
        &[0, 0, 0, 1],
        &[1, 2],
        &[0, 1, 1],
        &[1, 3],
        &[0, 0, 0, 0, 0, 0],
        &[2, 0],
        &[1, 0, 0],
        &[2, 1],
        &[0, 0, 1, 0]
    ]
);