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