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
//! Generic graph algorithms using GraphBackend trait
//!
//! This module provides algorithm implementations that work with any backend
//! implementing the GraphBackend trait (SQLite, Native V2, Native V3).
//!
//! # Design Principles
//!
//! - **Backend-agnostic**: Uses only GraphBackend trait methods
//! - **No SQLite dependency**: Works with V3 binary format
//! - **Zero overhead**: No wrappers or adapters, direct trait calls
//! - **Deterministic**: Same results regardless of backend
//!
//! # Available Algorithms
//!
//! - `pagerank` - PageRank centrality
//! - `betweenness_centrality` - Betweenness centrality (Brandes' algorithm)
//! - `bfs` - Breadth-first search traversal
//! - `shortest_path` - Dijkstra shortest path
//! - `strongly_connected_components` - Tarjan's SCC algorithm
//! - `topological_sort` - Kahn's algorithm
//!
//! # Usage
//!
//! ```rust
//! use sqlitegraph::backend::GraphBackend;
//! use sqlitegraph::algo::backend::pagerank;
//!
//! fn analyze_graph(graph: &dyn GraphBackend) {
//! let scores = pagerank(graph, 0.85, 20).unwrap();
//! // ... use scores
//! }
//! ```
// Re-export commonly used algorithms
pub use ;
pub use ;
pub use ;