pub fn random_rounding_modes(seed: Seed) -> RandomRoundingModes
Expand description

Uniformly generates random RoundingModes.

The output length is infinite.

Expected complexity

Constant time and additional memory.

Examples

use itertools::Itertools;
use malachite_base::random::EXAMPLE_SEED;
use malachite_base::rounding_modes::random::random_rounding_modes;
use malachite_base::rounding_modes::RoundingMode;
use malachite_base::rounding_modes::RoundingMode::*;

assert_eq!(
    random_rounding_modes(EXAMPLE_SEED).take(10).collect_vec(),
    &[Up, Exact, Ceiling, Up, Floor, Nearest, Exact, Up, Floor, Exact]
)