[−][src]Trait net_ensembles::sampling::traits::SimpleSample
For easy sampling of your ensemble
Required methods
fn randomize(&mut self)
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),
F: FnMut(&Self),
do the following times
times:
f(self)
self.randomize()
fn simple_sample_vec<F, G>(&mut self, times: usize, f: F) -> Vec<G> where
F: FnMut(&Self) -> G,
F: FnMut(&Self) -> G,
Implementors
impl<T, R> SimpleSample for ErEnsembleC<T, R> where
T: Node + SerdeStateConform,
R: Rng,
[src]
T: Node + SerdeStateConform,
R: Rng,
fn randomize(&mut self)
[src]
Randomizes the edges according to Er probabilities
- this is used by
ErEnsembleC::new
to create the initial topology - you can use this for sampling the ensemble
- runs in
O(vertices * vertices)
impl<T, R> SimpleSample for ErEnsembleM<T, R> where
T: Node + SerdeStateConform,
R: Rng,
[src]
T: Node + SerdeStateConform,
R: Rng,
fn randomize(&mut self)
[src]
Randomizes self according to model
- this is intended for creation of initial sample
- used in
simple_sample
andsimple_sample_vec
impl<T, R> SimpleSample for SwEnsemble<T, R> where
T: Node + SerdeStateConform,
R: Rng,
[src]
T: Node + SerdeStateConform,
R: Rng,
fn randomize(&mut self)
[src]
Randomizes the edges according to small-world model
- this is used by
SwEnsemble::new
to create the initial topology - you can use this for sampling the ensemble
- runs in
O(vertices)