pub fn bibcoupling(graph: &Graph) -> IgraphResult<Vec<u32>>Expand description
Computes bibliographic coupling scores between all pairs of vertices.
Two vertices are bibliographically coupled if they both cite (have
outgoing edges to) a common third vertex. The coupling score of u
and v is the number of vertices that both u and v have edges to.
For undirected graphs, this equals the number of common neighbors (same as cocitation).
Returns a flat vector of length n * n in row-major order.
§Examples
use rust_igraph::{Graph, bibcoupling};
// 0 → 2, 1 → 2 means vertices 0 and 1 both cite vertex 2
let mut g = Graph::new(3, true).unwrap();
g.add_edge(0, 2).unwrap();
g.add_edge(1, 2).unwrap();
let scores = bibcoupling(&g).unwrap();
assert_eq!(scores[0 * 3 + 1], 1); // coupling(0,1) = 1
assert_eq!(scores[1 * 3 + 0], 1); // symmetric