Skip to main content

recent_degree_aging_game

Function recent_degree_aging_game 

Source
pub fn recent_degree_aging_game(
    nodes: u32,
    m: u32,
    outseq: Option<&[u32]>,
    outpref: bool,
    pa_exp: f64,
    aging_exp: f64,
    aging_bins: u32,
    time_window: u32,
    zero_appeal: f64,
    directed: bool,
    seed: u64,
) -> IgraphResult<Graph>
Expand description

Recent-degree preferential attachment with vertex aging.

See module docs for the full contract.

§Errors

  • pa_exp / aging_exp not finite.
  • aging_bins == 0.
  • zero_appeal negative or non-finite.
  • outseq.len() != nodes.

§Examples

use rust_igraph::recent_degree_aging_game;

// 100-vertex directed graph, m=2 per step, no aging effect
// (aging_exp=0 makes the age term identically 1), 5-step window.
let g = recent_degree_aging_game(
    100, 2, None, false,
    1.0, 0.0, 10, 5,
    1.0, true, 0x42,
).unwrap();
assert_eq!(g.vcount(), 100);
assert_eq!(g.ecount(), 99 * 2);