Expand description
Establishment / sample-traits game (ALGO-GN-015).
Counterpart of igraph_establishment_game() from
references/igraph/src/games/establishment.c:57. Models a growing
graph with vertex types: a single vertex is added at each step and
tries to connect to k already-present vertices, with each candidate
edge accepted independently with probability
pref_matrix[type_new][type_old].
§Algorithm
- Build a cumulative distribution from
type_dist(or the uniform[1, 1, …, 1]distribution whentype_dist == None). - Assign every vertex
v ∈ [0, nodes)a type by drawing a uniform sample in[0, total)and binary-searching the cumulative table. - For each
v ∈ [k, nodes), drawkdistinct previous vertices[0, v)via Floyd’s distinct-sample. For each picked neighbouru, accept the edge(v, u)with probabilitypref_matrix[type[v]][type[u]]using a single uniform draw.
§Determinism
Reproducible given the inputs and seed against the shared
SplitMix64 PRNG. The stream is not portable
to upstream igraph’s GLIBC RNG, so conformance assertions are
structural (vertex/edge counts, type-vector range, support of the
preference matrix) rather than bit-exact.
§References
- G. Caldarelli, A. Capocci, P. De Los Rios, and M. A. Muñoz, “Scale-free networks from varying vertex intrinsic fitness”, Phys. Rev. Lett. 89, 258702 (2002).
Functions§
- establishment_
game - Generates a random graph with vertex types via the establishment model.