graph/graph_utils library
Graph representation helpers: adjacency list / weighted edges (roadmap #531).
Classes
- GraphUtils
- Weighted directed edge.
Functions
-
buildGraph(
List< (int, int)> edges, int nodeCount) → Adjacency -
Builds an unweighted Adjacency list from
edges, wherenodeCountis the max node index + 1. Edges referencing out-of-range nodes are skipped. -
buildWeightedGraph(
List< GraphUtils> edges, int nodeCount) → WeightedAdjacency -
Builds WeightedAdjacency from
edges;nodeCount= max node index + 1.