com.raphtory.algorithms.generic.dynamic.DiscreteSI

DiscreteSI

DiscreteSI(infectedNode: Iterable[String], infectionProbability: Double = 0.5, maxGenerations: Int = 100, seed:Long = -1)

discrete susceptible-infected (SI) model on the network

The network is treated as directed. An infected node propagates the infection along each of its out-edges with probability infectionProbability. The propagation terminates once there are no newly infected nodes or maxGenerations is reached. The initially infected seed nodes are considered generation 0.

Parameters

infectedNode: Seq[String]

names of initially infected nodes

infectionProbability: Double = 0.5

probability of infection propagation along each edge

seed: Long

seed for random number generator (specify for deterministic results)

maxGenerations: Int = 100

maximum number of propagation generations

States

infected: Boolean

infection status of vertex

generation: Int

generation at which vertex became infected (unset for vertices that were never infected)

Returns

vertex name

infection status

name: String

infected: Boolean