Struct ergothic::Simulation [−][src]
pub struct Simulation { /* fields omitted */ }
Public interface to measure registry and the entry point function.
Methods
impl Simulation
[src]
impl Simulation
pub fn new<N: ToString>(name: N) -> Simulation
[src]
pub fn new<N: ToString>(name: N) -> Simulation
Constructs a new simulation.
pub fn add_measure<N: ToString>(&mut self, name: N) -> MeasureIdx
[src]
pub fn add_measure<N: ToString>(&mut self, name: N) -> MeasureIdx
Registers a measure in the underlying measure registry and returns its
positional index safely wrapped in the MeasureIdx
type.
pub fn run<S: Sample, F>(self, f: F) where
F: Fn(&S, &mut Measures),
[src]
pub fn run<S: Sample, F>(self, f: F) where
F: Fn(&S, &mut Measures),
Entry point function. All ergothic simulations should call this function.
Consumes self
to indicate that the simulation runs in an infinite loop
and never returns.
Auto Trait Implementations
impl Send for Simulation
impl Send for Simulation
impl Sync for Simulation
impl Sync for Simulation