pub fn barabasi_aging_game(
nodes: u32,
m: u32,
outseq: Option<&[u32]>,
outpref: bool,
pa_exp: f64,
aging_exp: f64,
aging_bins: u32,
zero_deg_appeal: f64,
zero_age_appeal: f64,
deg_coef: f64,
age_coef: f64,
directed: bool,
seed: u64,
) -> IgraphResult<Graph>Expand description
Preferential attachment with vertex aging.
See module docs for the full contract.
§Errors
pa_exp/aging_expnot finite.aging_bins == 0.deg_coef/age_coef/zero_deg_appeal/zero_age_appealnegative or non-finite.outseq.len() != nodes.
§Examples
use rust_igraph::barabasi_aging_game;
// 100-vertex directed graph with classical preferential attachment
// (pa_exp = 1) and no aging (aging_exp = 0, age_coef = 0, so the
// age term collapses to a constant `zero_age_appeal = 1.0`). Total
// edges: (n - 1) * m = 99 * 2 = 198.
let g = barabasi_aging_game(
100, 2, None, false,
1.0, 0.0, 10,
1.0, 1.0,
1.0, 0.0,
true, 0x42,
).unwrap();
assert_eq!(g.vcount(), 100);
assert_eq!(g.ecount(), 198);