Try ThreadRng

This commit is contained in:
Joshua Coles 2023-03-03 11:02:28 +00:00
parent fcda9726d5
commit f5853580f4
2 changed files with 3 additions and 3 deletions

View File

@ -29,8 +29,8 @@ struct Cli {
fn main() { fn main() {
let cli = Cli::parse(); let cli = Cli::parse();
let mut sys = DLASystem::<SmallRng, VectorStorage, LocalRandomWalker>::new( let mut sys = DLASystem::<ThreadRng, VectorStorage, LocalRandomWalker>::new(
SmallRng::seed_from_u64(cli.seed), ThreadRng::default(),
cli.max_particles, cli.max_particles,
cli.stick_probability cli.stick_probability
); );

View File

@ -29,7 +29,7 @@ pub struct DLASystem<R: Rng, S: Storage, W: Walker<R>> {
impl<R: Rng, S: Storage, W: Walker<R>> DLASystem<R, S, W> { impl<R: Rng, S: Storage, W: Walker<R>> DLASystem<R, S, W> {
pub fn new(rng: R, max_particles: usize, stick_probability: f32) -> DLASystem<R, VectorStorage, LocalRandomWalker> { pub fn new(rng: R, max_particles: usize, stick_probability: f32) -> DLASystem<R, VectorStorage, LocalRandomWalker> {
let mut sys: DLASystem<SmallRng, VectorStorage, LocalRandomWalker> = DLASystem { let mut sys: DLASystem<R, VectorStorage, LocalRandomWalker> = DLASystem {
rng, rng,
stick_probability, stick_probability,
max_particles, max_particles,