graph_csr 1.0.2

A crate that provides utility functions for manipulating graphs in a CSR format, used as the baseline for constructing powerful graph algorithms.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
fn main() {
    let (input_graph, output_directory) = {
        let args = std::env::args().skip(1).collect::<Vec<_>>();

        if args.len() != 2 {
            println!("Usage: bfs <converted graph directory> <output directory>");
            return;
        }

        (args[0].clone(), args[1].clone())
    };

    let source_file = std::fs::File::open(input_graph).unwrap();

    graph_csr::Graph::<u32>::from_txt_adjacency_list(source_file, &output_directory).unwrap();
}