Skip to main content

seed

Function seed 

Source
pub fn seed(seed: u64) -> Result<()>
Expand description

Seeds the default random number generator of the calling thread (igraph_rng_seed).

Only the calling thread is affected: every thread has its own default generator, so seeded computations are reproducible even when other threads use random numbers at the same time. A generator installed with Rng::scoped is the default while it is in scope, so it is the one seeded then.

ยงErrors

Only if igraph fails to seed the generator (it never does for the generators shipped with igraph).