Expand description
§Graph Data Structures for PageRank Centrality
Efficient graph representation optimized for dependency analysis and PageRank computation. This module implements the core graph structures used in the PageRank centrality algorithm with emphasis on reverse edges for code dependency analysis.
§Design Philosophy
- Forward edges: A imports B (A -> B)
- Reverse edges: B is imported by A (B <- A)
- PageRank flows along reverse edges (importance flows to imported files)
- Memory-efficient adjacency list representation for large graphs (10k+ nodes)
- Fast degree queries and statistics calculation
Structs§
- Concurrent
Dependency Graph - Thread-safe concurrent version of DependencyGraph
- Degree
Info - Degree information for a node
- Dependency
Graph - Efficient dependency graph representation optimized for PageRank computation Uses integer-based internal representation for massive performance improvements
- Graph
Statistics - Graph statistics computed lazily and cached
- Node
Metadata - Metadata associated with each node in the graph
Enums§
- Traversal
Direction - Direction for graph traversal
Type Aliases§
- Edge
Weight - Edge weight type (unused in unweighted PageRank, but reserved for extensions)
- Internal
Node Id - Internal node identifier type for efficient graph operations (usize for array indexing)
- NodeId
- External node identifier type for the dependency graph (file paths)