Skip to main content

simulate_lt

Function simulate_lt 

Source
pub fn simulate_lt(
    adjacency: &AdjList,
    num_nodes: usize,
    seeds: &[usize],
    fixed_thresholds: Option<&[f64]>,
) -> Result<SimulationResult>
Expand description

Simulate one run of the Linear Threshold model.

§Arguments

  • adjacency — directed adjacency list source → [(target, weight)]. For LT the weights should satisfy Σ_{u} w(u,v) ≤ 1.
  • num_nodes — total number of nodes (used to allocate per-node state).
  • seeds — initial active set.
  • fixed_thresholds — if Some, use these thresholds; otherwise draw uniformly from [0, 1] per run.