Skip to main content

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 bfs_params;
14pub mod csr;
15pub mod error;
16pub mod overlay_delta;
17pub mod params;
18pub mod path_overlay;
19pub mod path_params;
20pub mod sharded;
21#[cfg(test)]
22mod test_support;
23pub mod traversal;
24pub mod traversal_options;
25pub mod traversal_overlay;
26pub mod traversal_surrogate;
27
28pub use bfs_params::BfsParams;
29pub use csr::extract_weight_from_properties;
30pub use csr::{CsrIndex, Direction, LocalNodeId};
31pub use csr::{DegreeHistogram, GraphStatistics, LabelStats};
32pub use error::{GraphError, MAX_EDGE_LABELS, MAX_NODES_PER_CSR};
33pub use overlay_delta::GraphOverlayDelta;
34pub use params::{AlgoColumnType, AlgoParams, GraphAlgorithm};
35pub use path_params::ShortestPathParams;
36pub use sharded::ShardedCsrIndex;
37pub use traversal_options::{GraphTraversalOptions, MAX_GRAPH_TRAVERSAL_DEPTH};
38pub use traversal_surrogate::{SurrogateBfsParams, SurrogateHops};