pub fn build_distributed_graph(
edges: &[(usize, usize)],
n_vertices: usize,
config: &DistributedGraphConfig,
) -> DistributedGraphExpand description
Build a DistributedGraph from an edge list.
Steps:
- Assign each vertex to a partition using the configured method.
- Assign each edge to a shard:
EdgeCut/HashBased: edge goes to the source vertex’s shard.VertexCut: edge goes to the shard of the endpoint with fewer edges.Fennel: same asEdgeCutafter FENNEL vertex assignment.
- Record mirror vertices for cross-shard edges.
- Build
vertex_mapfor O(1) location queries.