Expand description
Growing random graph (ALGO-GN-003).
Counterpart of igraph_growing_random_game() in
references/igraph/src/games/growing_random.c:55-105.
The model starts with a single vertex and grows the graph one step
at a time. On each step a fresh vertex is added together with m
new edges. Two endpoint-selection rules are supported:
- Citation mode (
citation = true): every new edge originates at the freshly-added vertex and connects to a uniformly random earlier vertex. Each new edge therefore points fromi(the freshly-added id) to someto ∈ [0, i - 1]. - Free mode (
citation = false): both endpoints are uniformly sampled —fromfrom[0, i](the new vertex itself is allowed) andtofrom[1, i]. The asymmetric bounds are inherited from upstream, where the closed interval[0, i]includes the new vertex and[1, i]excludes vertex 0 from the sink side to avoid pinning every edge at the seed.
Compared with the BAG variant of Barabási–Albert
(crate::barabasi_game_bag) the per-step kernel here is uniform
rather than degree-proportional — the bag bookkeeping disappears and
every step is a constant-time RNG draw. The resulting degree
distribution decays exponentially (not as a power law).
Time complexity: O(|V| + |E|) = O(n · m). Memory is the edge list
only: O(n · m).
§Scope
The full upstream call signature is (graph, n, m, directed, citation) — exposed here as four arguments plus a seed. There are
no special parameters or start_from hooks to translate.
Functions§
- growing_
random_ game - Generate a growing random graph on
nvertices, addingmnew edges per step.