Skip to main content

Module full_citation

Module full_citation 

Source
Expand description

Full citation graph constructor (ALGO-CN-025).

Counterpart of igraph_full_citation() in references/igraph/src/constructors/full.c:348-376.

A full citation graph is the complete DAG on n vertices in which every vertex i cites every earlier vertex j < i. Equivalently:

  • directed = true → directed acyclic graph with n·(n−1)/2 arcs (i, j) for every 0 ≤ j < i < n. The induced topological order is 0, 1, 2, …, n−1 (in-degree of vertex k equals k, out-degree equals n − 1 − k).
  • directed = false → undirected K_n with n·(n−1)/2 edges. The edge multiset matches full_graph(n, false, false), but the emission order is row-major over the destination’s index j < i (upstream emits (1,0), (2,0), (2,1), (3,0), (3,1), …), so the edge ids assigned by Graph::add_edges differ from full_graph’s undirected branch.

Time complexity: O(|V|² ) = O(|E|).

Degenerate inputs:

  • n == 0 → empty graph (vcount = 0, ecount = 0).
  • n == 1 → singleton, no edges.

Functions§

full_citation
Build the full citation graph on n vertices.