hmt-base-0.20: Haskell Music Theory Base
Safe HaskellSafe-Inferred
LanguageHaskell2010

Music.Theory.Graph.G6

Contents

Description

Synopsis

G6 (graph6)

g6_load :: FilePath -> IO [String] Source #

Load Graph6 file, discard optional header if present.

g6_dsc_load :: FilePath -> IO [(String, String)] Source #

Load G6 file variant where each line is "DescriptiontG6"

g6_to_edg :: [String] -> IO [Edg] Source #

Call nauty-listg to transform a sequence of G6. (debian = nauty)

adj_mtx_to_am :: Adj_Mtx Int -> String Source #

Generate the text format read by nauty-amtog.

e = ((4,3),[(0,3),(1,3),(2,3)])
m = T.edg_to_adj_mtx_undir (0,1) e
putStrLn (adj_mtx_to_am m)

adj_mtx_to_g6 :: [Adj_Mtx Int] -> IO [String] Source #

Call nauty-amtog to transform a sequence of Adj_Mtx to G6.

adj_mtx_to_g6 [m,m]

g6_labelg :: [String] -> IO [String] Source #

Call nauty-labelg to canonise a set of graphs.

g_labelg :: [G] -> IO [G] Source #

g6_to_g of g6_labelg of g_to_g6

g1 = ([0,1,2,3],[(0,3),(3,1),(3,2),(1,2)])
g2 = ([0,1,2,3],[(1,0),(0,3),(0,2),(2,3)])
[g3,g4] <- g_labelg [g1,g2]
(g1 == g2,g3 == g4)