/// Check whether a permutation is automorphic or not
Check whether a permutation is automorphic or not
Check whether a permutation is automorphic or not
pub fn is_automorphic(
    perm: &permutation::Permuation,
    edges: &Vec<(usize, usize, usize)>
) -> bool {
    for (n1, n2, edge_type) in edges.iter() {
        let n1_target: usize = perm[*n1];
        let n2_target: usize = perm[*n2];
        if !edges.contains(&(n1_target, n2_target, *edge_type)) {
            return false
        }
    }
    return true
}
pub fn is_automorphic ( perm : & permutation :: Permuation , edges : & Vec < ( usize , usize , usize ) > ) -> bool { for ( n1 , n2 , edge_type ) in edges . iter ( ) { let n1_target : usize = perm [ * n1 ] ; let n2_target : usize = perm [ * n2 ] ; if ! edges . contains ( & ( n1_target , n2_target , * edge_type ) ) { return false } } return true }
Check whether a permutation is automorphic or not
Check whether a permutation is automorphic or not
perm
&permutation::Permuation
edges
&Vec<(usize, usize, usize)>