UMinho Haskell Libraries (2006.06.14)ContentsIndex
Data.Relation.GraphViz
Portabilityportable
Stabilityexperimental
Maintainerjoost.visser@di.uminho.pt
Contents
Graph printing
Representation
Printing
Auxilliaries
Description
Synopsis
printGraphWith :: Ord a => (a -> NodeName) -> (Gph a -> a -> String) -> GraphName -> Gph a -> DotGraph
printRelWith :: (Ord a, Ord b) => (a -> NodeName) -> (Rel a b -> a -> String) -> (b -> NodeName) -> (Rel a b -> b -> String) -> GraphName -> Rel a b -> DotGraph
printComponentGraphWith :: Ord a => (a -> NodeName) -> (a -> String) -> GraphName -> Gph (Set a) -> DotGraph
showFormattedSet :: (a -> String) -> Set a -> String
type DotStatement = String
type DotAttributes = String
type NodeName = String
type GraphName = String
type DotGraph = String
mkNode :: DotAttributes -> NodeName -> DotStatement
mkEdge :: DotAttributes -> (NodeName, NodeName) -> DotStatement
mkEdgeBack :: DotAttributes -> (NodeName, NodeName) -> DotStatement
quote :: String -> String
Graph printing
printGraphWith
:: Ord a
=> (a -> NodeName)print domain node identifier
-> (Gph a -> a -> String)print domain node label
-> GraphNamegraph name
-> Gph arelation to print
-> DotGraphstring to export to dot
Print a graph to dot format. This function is parameterized with functions for printing names and labels of individual nodes.
printRelWith
:: (Ord a, Ord b)
=> (a -> NodeName)print domain node identifier
-> (Rel a b -> a -> String)print domain node label
-> (b -> NodeName)print range node identifier
-> (Rel a b -> b -> String)print range node label
-> GraphNamegraph name
-> Rel a brelation to print
-> DotGraphstring to export to dot
Print a relation to dot format. This function is parameterized with functions for printing names and labels of individual nodes.
printComponentGraphWith
:: Ord a
=> (a -> NodeName)print identifier for element of set
-> (a -> String)pretty-print element of set
-> GraphNamegraph name
-> Gph (Set a)relation to print
-> DotGraphstring to export to dot
Print a graph to dot format. This function is parameterized with functions for printing names and labels of individual nodes.
showFormattedSet
:: (a -> String)show function for elements
-> Set aset to show
-> String
Function that shows the elemens of a set spread nicely over lines that are not too long. On each line elements are separated by spaces. The number of elements of the set determines how long each line is allowed to grow.
Representation
type DotStatement = String
The type of dot statements.
type DotAttributes = String
A list of dot attributes is represented by a string.
type NodeName = String
The type of node names
type GraphName = String
The type of graph names
type DotGraph = String
The type of exportable graphs (file content)
Printing
mkNode :: DotAttributes -> NodeName -> DotStatement
Create a node statement
mkEdge :: DotAttributes -> (NodeName, NodeName) -> DotStatement
Create an edge statement
mkEdgeBack :: DotAttributes -> (NodeName, NodeName) -> DotStatement
Create an edge statement with inverted direction
Auxilliaries
quote :: String -> String
Put quotes around a string.
Produced by Haddock version 0.7