canonical-form
Algorithm to reduce combinatorial structures modulo isomorphism.
This can typically be used to to test if two graphs are isomorphic.
The algorithm manipulates its input as a black box by the action of permutations and by testing equallity with element of its orbit, 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