nodedb_graph/lib.rs
1// SPDX-License-Identifier: Apache-2.0
2
3//! Graph engine primitives shared by Origin, Lite, and WASM: CSR adjacency
4//! index, traversal algorithms (PageRank, WCC, LabelPropagation, LCC, SSSP,
5//! Betweenness, Closeness, Harmonic, Degree, Louvain, Triangles, Diameter,
6//! k-Core), MATCH pattern engine, and the sharded BSP execution path used
7//! by the distributed graph overlay.
8//!
9//! Graph is a cross-engine *overlay* — it does not own row storage. Edges
10//! and nodes are projected from any data-bearing collection (typically a
11//! `document_strict` collection) via `EDGE` and `NODE` declarations.
12
13pub mod csr;
14pub mod error;
15pub mod sharded;
16pub mod traversal;
17
18pub use csr::extract_weight_from_properties;
19pub use csr::{CsrIndex, Direction, LocalNodeId};
20pub use csr::{DegreeHistogram, GraphStatistics, LabelStats};
21pub use error::{GraphError, MAX_EDGE_LABELS, MAX_NODES_PER_CSR};
22pub use sharded::ShardedCsrIndex;