terrain-graph
A simple graph library for Rust based on adjacency lists.
This is a subproject for the fastlem.
This library contains the following structures:
DirectedGraphUndirectedGraphEdgeAttributedDirectedGraphEdgeAttributedUndirectedGraph
Usage
[]
= "1.0.1"
This is a basic example of how to use the UndirectedGraph and DirectedGraph:
use *;
// Create an undirected graph
let mut undirected_graph = new;
undirected_graph.add_edge;
undirected_graph.add_edge;
println!; // Outputs: true
println!; // Outputs: 2
// Create a directed graph
let mut directed_graph = new;
directed_graph.add_edge;
directed_graph.add_edge;
println!; // Outputs: false
println!; // Outputs: 2
println!; // Outputs: 1