Try ThreadRng

This commit is contained in:
2023-03-03 11:03:06 +00:00
parent fcda9726d5
commit f5853580f4
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -29,8 +29,8 @@ struct Cli {
fn main() {
let cli = Cli::parse();
let mut sys = DLASystem::<SmallRng, VectorStorage, LocalRandomWalker>::new(
SmallRng::seed_from_u64(cli.seed),
let mut sys = DLASystem::<ThreadRng, VectorStorage, LocalRandomWalker>::new(
ThreadRng::default(),
cli.max_particles,
cli.stick_probability
);
+1 -1
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> {
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,
stick_probability,
max_particles,