Function cnetworks::spread_si [−][src]
pub fn spread_si(net: &mut Network, steps: usize) -> usize
Expand description
Simulate spread of information according to the susceptible-infected diffusion model.
On each time step the nodes for which the infected
flag is true
will try to infect
their closest neighbors with probability given by link weight, setting their
“INFECTED” flag.
Returns the root of the infection.