Function iterative_methods::utils::generate_enumerated_step_stream[][src]

pub fn generate_enumerated_step_stream(
    stream_length: usize,
    capacity: usize,
    initial_value: i64,
    final_value: i64
) -> impl StreamingIterator<Item = Numbered<i64>>
Expand description

Produce an enumerated stream like [(0,a), (1,a),…, (capacity, b), …, (stream_length-1, b)] with capacity copies of “a” (aka initial_values) and stream_length total values. Utility function used in examples showing convergence of reservoir mean to stream mean.