Trait net_ensembles::sampling::SimpleSample [−][src]
pub trait SimpleSample {
fn randomize(&mut self);
fn simple_sample<F>(&mut self, times: usize, f: F)
where
F: FnMut(&Self),
{ ... }
fn simple_sample_vec<F, G>(&mut self, times: usize, f: F) -> Vec<G, Global>
where
F: FnMut(&Self) -> G,
{ ... }
}
Expand description
For easy sampling of your ensemble
Required methods
Randomizes self according to model
- this is intended for creation of initial sample
- used in
simple_sample
andsimple_sample_vec
Provided methods
fn simple_sample<F>(&mut self, times: usize, f: F) where
F: FnMut(&Self),
fn simple_sample<F>(&mut self, times: usize, f: F) where
F: FnMut(&Self),
do the following times
times:
f(self)
self.randomize()