Module graph

Module graph 

Source
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§

ConcurrentDependencyGraph
Thread-safe concurrent version of DependencyGraph
DegreeInfo
Degree information for a node
DependencyGraph
Efficient dependency graph representation optimized for PageRank computation
GraphStatistics
Graph statistics computed lazily and cached
NodeMetadata
Metadata associated with each node in the graph

Type Aliases§

EdgeWeight
Edge weight type (unused in unweighted PageRank, but reserved for extensions)
NodeId
Node identifier type for the dependency graph