-
-
Notifications
You must be signed in to change notification settings - Fork 473
Closed
Description
It would be nice if the various PRNG Generators implemented PartialEq/Eq (where possible) so that it's possible to validate determinism in a simulation.
Example
let rng = SomePrng::new();
let mut initial_state = State::new(rng);
let mut determinism_check_state = initial_state.clone();
simulate(&mut initial_state);
simulate(&mut determinism_check_state);
assert_eq!(&initial_state, &determinism_check_state);
Currently this has to be worked around by introducing a wrapper type that inappropriately peers into the implementation details of the PRNG Generator to do a memory compare.
Metadata
Metadata
Assignees
Labels
No labels