Crate scotch

source ·
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

Modules

Structs

  • Error type for Scotch functions.

Type Definitions