Skip to main content

Module core

Module core 

Source
Expand description

Core hypergraph data structures and expansions.

Provides two complementary representations:

  • IndexedHypergraph – usize-indexed, weight-carrying structure used by spectral and algorithmic routines (the original workhorse).
  • Hypergraph – generic <N, E> structure whose nodes carry arbitrary data and whose hyperedges carry metadata of type E.

Both expose clique expansion, star expansion, and bipartite representation.

Structs§

Hyperedge
A hyperedge in an indexed hypergraph.
Hypergraph
Generic hypergraph whose nodes carry data of type N and hyperedges carry metadata of type E.
IndexedHypergraph
A hypergraph with usize-indexed nodes and rich algorithmic support.

Functions§

clique_expansion
Build the 2-section graph (clique expansion) of an IndexedHypergraph.
hyperedge_centrality
Compute hyperedge centrality via power iteration on B^T D_v^{-1} B D_e^{-1}.
hypergraph_clustering_coefficient
Compute the local clustering coefficient of a node in an IndexedHypergraph.
hypergraph_random_walk
Perform a random walk on an IndexedHypergraph.
hypergraph_random_walk_seeded
Convenience wrapper: run hypergraph_random_walk with a seeded RNG.
line_graph
Build the line graph of an IndexedHypergraph.