Reach.Graph (Reach v2.5.0)

Copy Markdown View Source

Adjacency-list graph data structure with vertex and edge operations.

Summary

Functions

Merges multiple Graph.t() structs by combining their internal maps.

Functions

merge(graphs)

@spec merge([Graph.t()]) :: Graph.t()

Merges multiple Graph.t() structs by combining their internal maps.

Much faster than Graph.add_edges/2 in a loop because it avoids per-edge vertex ID hashing and map lookups.