Expand description
A wrapper around Scotch bindings.
This crate provides a thin but idiomatic API for libscotch.
Example
Here is an example of graph partitioning:
let partnbr = 3; // divide the graph in three parts.
let mut strat = scotch::Strategy::new(); // use the default strategy.
let arch = scotch::Architecture::complete(partnbr); // all parts are equal.
let mut graph = scotch::Graph::from_file("testdata/grid.grf", -1)?; // load a graph file.
// Partition the graph:
let (vertnbr, _edgenbr) = graph.size();
let mut parttab = vec![0; vertnbr as usize];
graph
.mapping(&arch, &mut parttab)
.compute(&mut strat)?
.write_to_stdout()?;
Re-exports
pub use crate::architecture::Architecture;
pub use crate::graph::Graph;
pub use crate::strategy::Strategy;
Modules
- Functions and data structures related to Architectures.
- Functions and data structures related to Graphs.
- Functions and data structures related to
Strategy
.
Structs
- Error type for Scotch functions.
Type Definitions
- Scotch’s numeral type.
- Convenience wrapper around
std::result::Result
which bears the Scotch error type.