spreadlab/internal/engine
Justin Visser 736cd9070d engine: edge thresholds and the independent cascade
One random threshold per DIRECTED edge, drawn once per world: scenarios
sharing thresholds differ only in who is educated, the prototype's
'same world, different lever' trick. The cascade is plain BFS in rounds;
an educated student receives the fake but never forwards it, which is
the entire effect of the lever. The result stores the first-reached
round per node (exactly what a frontend animation needs).
Tests hand-craft a 4-node line graph with exact thresholds, so every
expectation is exact: spread, directional blocking, educated cutoff.
2026-06-10 12:08:12 +02:00
..
cascade.go engine: edge thresholds and the independent cascade 2026-06-10 12:08:12 +02:00
cascade_test.go engine: edge thresholds and the independent cascade 2026-06-10 12:08:12 +02:00
graph.go engine: undirected simple graph with deterministic neighbour order 2026-06-10 11:58:45 +02:00
graph_test.go engine: undirected simple graph with deterministic neighbour order 2026-06-10 11:58:45 +02:00
holmekim.go engine: Holme-Kim network generator (powerlaw_cluster_graph port) 2026-06-10 12:05:43 +02:00
holmekim_test.go engine: Holme-Kim network generator (powerlaw_cluster_graph port) 2026-06-10 12:05:43 +02:00
rng.go engine: seeded RNG helper, first tests 2026-06-10 11:57:39 +02:00
rng_test.go engine: undirected simple graph with deterministic neighbour order 2026-06-10 11:58:45 +02:00