1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//! Hypergraph algorithms and simplicial complexes.
//!
//! This module provides four sub-modules:
//!
//! | Sub-module | Contents |
//! |---|---|
//! | [`core`] | Core data structures: [`IndexedHypergraph`], generic [`Hypergraph<N,E>`], clique/star/bipartite expansions |
//! | [`algorithms`] | Spectral clustering, hyperedge cuts, stationary distribution, betweenness centrality, s-walks |
//! | [`simplicial`] | [`SimplicialComplex`], boundary matrices, Betti numbers, Vietoris-Rips/Čech/nerve complexes |
//! | [`higher_order`] | [`MotifTensor`], topological features, [`CellularSheaf`] and Hodge Laplacian |
//!
//! # Quick Start
//!
//! ```rust
//! use scirs2_graph::hypergraph::{IndexedHypergraph, clique_expansion, SpectralClusteringResult};
//! use scirs2_graph::hypergraph::{SimplicialComplex, CellularSheaf};
//!
//! // Build a hypergraph
//! let mut hg = IndexedHypergraph::new(5);
//! hg.add_hyperedge(vec![0,1,2], 1.0).unwrap();
//! hg.add_hyperedge(vec![2,3,4], 1.0).unwrap();
//!
//! // Clique expansion → ordinary graph
//! let g = clique_expansion(&hg);
//! assert_eq!(g.node_count(), 5);
//!
//! // Simplicial complex topology
//! let mut sc = SimplicialComplex::new();
//! sc.add_simplex(vec![0,1,2]);
//! let betti = sc.betti_numbers();
//! assert_eq!(betti[0], 1); // connected
//! ```
// Core structures and free functions
pub use ;
// Algorithms
pub use ;
// Simplicial complexes
pub use SimplicialComplex;
// Higher-order analysis
pub use ;