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

Music.Theory.Graph.Planar

Description

Synopsis

Documentation

plc_header_txt :: String Source #

The 15-character header text indicating a Planar-Code file.

plc_header :: ByteString -> String Source #

Read Plc header

plc_data :: ByteString -> [Int] Source #

Read Plc data as list of Int

plc_length :: (Int, Int) -> Int Source #

Calculate length of Plc data given (n-vertices,n-edges).

plc_scanner :: Int -> [Int] -> ([Int], [Int]) Source #

Scan Plc data and segment after k zeros.

type Plc = (Int, [[Int]]) Source #

(n-vertices,clockwise-edge-sequences)

plc_group :: Int -> [Int] -> Plc Source #

Group Plc data into Plc structure.

plc_segment :: [Int] -> [Plc] Source #

Segment input data into sequence of Plc.

plc_load :: FilePath -> IO [Plc] Source #

Load sequence of Plc from binary Planar-Code file.

plc_edge_set :: Plc -> [(Int, Int)] Source #

All edges (one-indexed) at Plc

plc_next_elem :: Eq t => [t] -> t -> t Source #

Element in x after i, the element after the last is the first.

map (plc_next_elem "abcd") "abcd" == "bcda"

plc_next_edge :: Plc -> (Int, Int) -> (Int, Int) Source #

The next edge in Plc following e.

plc_face_from :: Plc -> (Int, Int) -> [(Int, Int)] Source #

The face of Plc starting at e (one-indexed edges).

plc_face_set :: Plc -> [[(Int, Int)]] Source #

The set of all faces at Plc (one-indexed edges).

plc_to_g :: Plc -> G Source #

Translate Plc into un-directed G. Plc is one-indexed, G is zero-indexed.

g6_planarg :: [String] -> IO ByteString Source #

Run "nauty-planarg" to convert (if possible) a set of G6 graphs to Planar-Code.

g6_to_pl_wr :: FilePath -> FilePath -> IO () Source #

Run "nauty-planarg" to translate named G6 file to named PL file.