|Avery R. 384ee7468d||8 months ago|
|src||8 months ago|
|.gitignore||8 months ago|
|README.md||8 months ago|
TDMG is a Haskell module for generating directed graphs according to the technique from the above tweet. A brief overview of that technique:
Given an arbitrary base,
Edge is a data structure containing two integers, a head and a tail.
It represents an edge in a directed graph.
The constructor for
Edge takes the form
Edge tail head, where
Graph is a data structure composed of a cons list of
represents a directed graph.
The constructors for
Graph Edge Graph.
fromList :: [(Integer,Integer)] -> Graph
fromList converts a list of the form
[(Integer,Integer)] into a
gen :: Integer -> Integer -> Graph
gen generates the directed graph for some arbitrary base and some
arbitrary number. It takes the form
gen base num.
TDMG also ships with an executable. This can be compiled using
ghc. Run the
executable for usage instructions. For all intents and purposes, it can be
thought of as exposing the
gen function to the system.