canonical-form
Algorithm to reduce combinatorial structures modulo isomorphism.
This can typically be used to to test if two graphs are isomorphic.
The algorithm manipulate its input by actions of permutations and by testing equallity, plus some user-defined functions that help to break symmetries.
use Canonize;
// Simple Graph implementation as adjacency lists
// The Canonize trait allows to use the canonial form algorithms
// Usage of library functions
// Two isomorphic graphs
let c5 = new;
let other_c5 = new;
assert_eq!;
// Non-isomorphic graphs
let p5 = new;
assert!;
// Recovering the permutation that gives the canonical form
let p = c5.morphism_to_canonical;
assert_eq!;
// Enumerating automorphisms
assert_eq!
License: MIT