|
Data.Relation.GraphViz | Portability | portable | Stability | experimental | Maintainer | joost.visser@di.uminho.pt |
|
|
|
|
|
Description |
|
|
Synopsis |
|
|
|
|
Graph printing
|
|
printGraphWith |
:: Ord a | | => (a -> NodeName) | print domain node identifier
| -> (Gph a -> a -> String) | print domain node label
| -> GraphName | graph name
| -> Gph a | relation to print
| -> DotGraph | string 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
| -> GraphName | graph name
| -> Rel a b | relation to print
| -> DotGraph | string 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
| -> GraphName | graph name
| -> Gph (Set a) | relation to print
| -> DotGraph | string 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 a | set 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 |