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
- Graph
Statistics - Graph statistics computed lazily and cached
- Node
Metadata - Metadata associated with each node in the graph
Type Aliases§
- Edge
Weight - Edge weight type (unused in unweighted PageRank, but reserved for extensions)
- NodeId
- Node identifier type for the dependency graph