2 releases
0.1.1 | Dec 26, 2023 |
---|---|
0.1.0 | Dec 26, 2023 |
#293 in FFI
7KB
109 lines
genpet
Generate petgraph graphs with geng.
Examples
use genpet::generate_graphs;
use genpet::GengOption;
let graphs = generate_graphs(3, &[]);
for graph in graphs {
println!("{}", graph.node_count());
}
let graphs = generate_graphs(4, &[GengOption::Connected, GengOption::Chordal]);
for graph in graphs {
println!("{}", graph.node_count());
}
Testing locally
- Install Rust and Cargo
- Install nauty
- Run
cargo test
lib.rs
:
genpet
Generate petgraph graphs using the geng program from nauty.
Example
use genpet::generate_graphs;
use genpet::GengOption;
let graphs = generate_graphs(3, &[]);
for graph in graphs {
println!("{}", graph.node_count());
}
let graphs = generate_graphs(4, &[GengOption::Connected, GengOption::Chordal]);
for graph in graphs {
println!("{}", graph.node_count());
}
Dependencies
~2MB
~30K SLoC