Try ThreadRng
This commit is contained in:
parent
fcda9726d5
commit
f5853580f4
@ -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
|
||||
);
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user