exo-hypergraph
Hypergraph substrate for higher-order relational reasoning with persistent homology and sheaf theory. Enables cognitive representations that go beyond pairwise edges to capture n-ary relationships natively.
Features
- Hyperedge storage -- first-class support for edges that connect arbitrary sets of nodes, stored in a compressed sparse format.
- Sheaf sections -- attach typed data (sections) to nodes and edges with consistency conditions enforced by sheaf restriction maps.
- Sparse persistent homology (PPR-based O(n/epsilon)) -- computes topological features efficiently using personalised PageRank sparsification.
- Betti number computation -- extracts Betti-0 (connected components), Betti-1 (loops), and higher Betti numbers to summarise structural topology.
Quick Start
Add the dependency to your Cargo.toml:
[]
= "0.1"
Basic usage:
use ;
use ;
let config = default;
let mut hg = new;
let e1 = new;
let e2 = new;
let e3 = new;
// Create a 3-way hyperedge
let relation = Relation ;
hg.create_hyperedge.unwrap;
// Compute topological invariants
let betti = hg.betti_numbers;
println!;
Crate Layout
| Module | Purpose |
|---|---|
graph |
Core hypergraph data structure |
sheaf |
Sheaf sections and restriction maps |
homology |
Sparse persistent homology pipeline |
betti |
Betti number extraction and summarisation |
Requirements
- Rust 1.78+
- Depends on
exo-core
Links
License
MIT OR Apache-2.0