pub fn new(algorithm: RandomNumberAlgorithm) -> Box<dyn RandomNumber> {
    match algorithm {
        RandomNumberAlgorithm::MersenneTwister => Box::new(MersenneTwister::new()),
        RandomNumberAlgorithm::MiddleSquareWeylSequence => Box::new(MiddleSquaresWeylSequence::new()),
        RandomNumberAlgorithm::XorshiftPlus => Box::new(XorshiftPlus::new()),
        RandomNumberAlgorithm::Xoshiro256SS => Box::new(Xoshiro256SS::new()),
    }
}
/// Generates a new random number generator using the given implementation, seeded with
/// the current time in nanos.
Generates a new random number generator using the given implementation, seeded with
the current time in nanos.
Generates a new random number generator using the given implementation seeded with the current time in nanos .
pub fn new(algorithm: RandomNumberAlgorithm) -> Box<dyn RandomNumber> {
    match algorithm {
        RandomNumberAlgorithm::MersenneTwister => Box::new(MersenneTwister::new()),
        RandomNumberAlgorithm::MiddleSquareWeylSequence => Box::new(MiddleSquaresWeylSequence::new()),
        RandomNumberAlgorithm::XorshiftPlus => Box::new(XorshiftPlus::new()),
        RandomNumberAlgorithm::Xoshiro256SS => Box::new(Xoshiro256SS::new()),
    }
}
pub fn new ( algorithm : RandomNumberAlgorithm ) -> Box < dyn RandomNumber > { match algorithm { RandomNumberAlgorithm :: MersenneTwister => Box :: new ( MersenneTwister :: new ( ) ) , RandomNumberAlgorithm :: MiddleSquareWeylSequence => Box :: new ( MiddleSquaresWeylSequence :: new ( ) ) , RandomNumberAlgorithm :: XorshiftPlus => Box :: new ( XorshiftPlus :: new ( ) ) , RandomNumberAlgorithm :: Xoshiro256SS => Box :: new ( Xoshiro256SS :: new ( ) ) , } }
Generates a new random number generator using the given implementation, seeded with
the current time in nanos.
Generates a new random number generator using the given implementation seeded with the current time in nanos .
algorithm
RandomNumberAlgorithm
algorithm
RandomNumberAlgorithm