Kurve
Simple adjacency list Graph data structure with Dijkstra pathing.
No bells, no whistles; just a graph with the ability to add / remove vertices with weighted / unweighted edges with a simple pathing algorithm.
Performance? Not designed with that in mind but good enough for simple - intermediate cases.
Usage
use Kurve;
// Create a graph with String IDs and i32 values
let mut graph: = new;
// Add some vertices
graph.add_vertex;
graph.add_vertex;
graph.add_vertex;
graph.add_vertex;
// Add some edges
graph.add_edge;
graph.add_edge;
graph.add_edge;
graph.add_edge;
// Get neighbors of a node
let neighbors = graph.get_neighbors; // ["id_2", "id_3"]
// Find paths
let path = graph.dijkstra; // ["id_1", "id_2", "id_4"]