rust-graph 0.0.3

A graph library for Rust
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[macro_use]
extern crate rust_graph as graph;

use graph::algorithms::connected_components;
use graph::graph::AdjListGraph;

fn main() {
    // Construct graph
    let mut g: AdjListGraph<(), ()> = AdjListGraph::new(false);
    let e = edges!(0 => 3, 3 => 2, 3 => 1, 1 => 4, 4 => 2);
    g.add_edges(e);

    connected_components(&g);
    //mst.output_graphviz("prim-mst.dot");

    // TODO: Strongly connected_components
}