Copyright | (c) Ivan Lazar Miljenovic 2009 |
---|---|
License | 2-Clause BSD |
Maintainer | Ivan.Miljenovic@gmail.com |
Safe Haskell | None |
Language | Haskell98 |
Functions to assist in visualising graphs and components of graphs.
- graphviz :: Ord cl => GraphvizParams Node nl el cl l -> GraphData nl el -> DotGraph Node
- graphvizClusters :: ClusterLabel nl => GraphvizParams Node nl el (Cluster nl) (NodeLabel nl) -> GraphData nl el -> DotGraph Node
- assignCluster :: ClusterLabel cl => LNode cl -> LNodeCluster (Cluster cl) (NodeLabel cl)
- setDir :: (GraphvizParams Node nl el cl l -> AGr nl el -> a) -> GraphvizParams Node nl el cl l -> GraphData nl el -> a
- showPath :: Show a => [a] -> String
- showPath' :: (a -> String) -> [a] -> String
- showCycle :: Show a => [a] -> String
- showCycle' :: (a -> String) -> [a] -> String
- showNodes :: Show a => [a] -> String
- showNodes' :: (a -> String) -> [a] -> String
- blockPrint :: Show a => [a] -> String
- blockPrint' :: [String] -> String
- blockPrintList :: Show a => [a] -> String
- blockPrintList' :: [String] -> String
- blockPrintWith :: Show a => String -> [a] -> String
- blockPrintWith' :: String -> [String] -> String
Graph visualisation.
Simple wrappers around the Haskell Data.GraphViz library to turn
GraphData
s into basic DotGraph
s for processing by the GraphViz
suite of applications.
blankParams
may be useful for creating initial definitions of
GraphvizParams
, especially for graphvizClusters
.
graphvizClusters :: ClusterLabel nl => GraphvizParams Node nl el (Cluster nl) (NodeLabel nl) -> GraphData nl el -> DotGraph Node Source #
Convert the clustered GraphData
into DotGraph
format.
Cluster the nodes based upon their ClusterLabel
clusters.
assignCluster :: ClusterLabel cl => LNode cl -> LNodeCluster (Cluster cl) (NodeLabel cl) Source #
A function to convert an LNode
to the required LNodeCluster
for use with the GraphViz library.
setDir :: (GraphvizParams Node nl el cl l -> AGr nl el -> a) -> GraphvizParams Node nl el cl l -> GraphData nl el -> a Source #
A cross between applyDirAlg
and setDirectedness
.
Showing node groupings.
Printing different lists of labels.
showCycle :: Show a => [a] -> String Source #
Print a cycle: copies the first node to the end of the list,
and then calls showPath
.
showCycle' :: (a -> String) -> [a] -> String Source #
Print a cycle: copies the first node to the end of the list,
and then calls showPath'
.
showNodes' :: (a -> String) -> [a] -> String Source #
Show a group of nodes, with no implicit ordering.
Various printing functions.
blockPrint :: Show a => [a] -> String Source #
Attempt to convert the String
form of a list into
as much of a square shape as possible, using a single
space as a separation string.
blockPrint' :: [String] -> String Source #
Attempt to convert a list of String
s into a single String
that is roughly a square shape, with a single space as a row
separator.
blockPrintList :: Show a => [a] -> String Source #
Attempt to convert the String
form of a list into
as much of a square shape as possible, separating values
with commas.
blockPrintList' :: [String] -> String Source #
Attempt to combine a list of String
s into as much of a
square shape as possible, separating values with commas.