Algorithms, operations, generators, and representations for directed graphs
Installation
Add the following to your Cargo.toml:
[]
= "0.43.0"
Overview
Operations
Build and query graphs made with standard collections, or implement the operation traits for your own types.
use ;
let mut graph = empty;
graph.add_edge;
graph.add_edge;
assert_eq!;
assert_eq!;
assert_eq!;
Algorithms
Search, traverse, and analyze graphs built from the types that implement the operation traits.
use single_pair_shortest_path as spsp;
// 0 ← 1
// ↑ ↑
// 3 → 2
let graph = ;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
Representations
An adjacency matrix representation is available with the adjacency_matrix
feature.
use ;
let mut graph = new;
graph.add_edge;
graph.add_edge;
assert!;
Generators
Generate parameterized graphs.
use *;
assert_eq!;
assert_eq!;
assert_eq!;
Features
adjacency_matrix enables the adjacency matrix representation. Requires nightly.
Changelog
See CHANGELOG.md.
License
Licensed under either the Apache License, Version 2.0 or the MIT license at your option.