Graphlib
Graphlib is a simple and powerful rust library for the graph data-structure that is optimized for high churn environments (where the graph mutates often). It provides a simple api for manipulating and for interacting with graphs.
Usage
use Graph;
let mut graph: = new;
// Add two vertices to the graph
let id1 = graph.add_vertex;
let id2 = graph.add_vertex;
// Add an edge between the two vertices
graph.add_edge;
assert_eq!;
assert_eq!;
// The graph has 2 vertices and one edge at this point
assert_eq!;
assert_eq!;
// Remove one of the connected vertices
graph.remove;
assert_eq!;
assert_eq!;