[][src]Struct mc_sim::sim::Simulation

pub struct Simulation { /* fields omitted */ }

A simulation of a series of streams of speed runs, distributed over worker threads.

Implementations

impl Simulation[src]

pub fn new(goals: SimulationGoals, thread_count: u32) -> Self[src]

Create a simulation.

let goals = SimulationGoalsBuilder::new().add_runs(5, 10, 7).goals();
let simulation = Simulation::new(goals, 4);
let results = simulation.simulate_n_times(100);

pub fn simulate_n_times(self, cycles: u64) -> Vec<StreamResults>[src]

Run the simulation for a given number of cycles and get the results. This will consume the simulator.

pub fn run_to_p_value(self, p_value: f64) -> StreamResults[src]

Run the simulation until a desired p-value is reached. I.E. The luckiest run seen, is as lucky, or luckier than the given p-value.

pub fn goals(&self) -> &SimulationGoals[src]

The goals of the simulation.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,