Maintainer | [email protected] |
---|
Data.GraphViz.Types
Description
This module defines the overall types and methods that interact with them for the GraphViz library. The specifications are based loosely upon the information available at: http://graphviz.org/doc/info/lang.html
- data DotGraph = DotGraph {
- strictGraph :: Bool
- directedGraph :: Bool
- graphID :: Maybe GraphID
- graphAttributes :: [Attribute]
- graphNodes :: [DotNode]
- graphEdges :: [DotEdge]
- data GraphID
- data DotNode
- = DotNode {
- nodeID :: Int
- nodeAttributes :: [Attribute]
- | DotCluster {
- clusterID :: String
- clusterAttributes :: [Attribute]
- clusterElems :: [DotNode]
- = DotNode {
- data DotEdge = DotEdge {}
- parseDotGraph :: Parse DotGraph
- setID :: GraphID -> DotGraph -> DotGraph
- makeStrict :: DotGraph -> DotGraph
- isValidGraph :: DotGraph -> Bool
- invalidAttributes :: DotGraph -> ([Attribute], [(DotNode, Attribute)], [(DotEdge, Attribute)])
Documentation
The internal representation of a graph in Dot form.
Constructors
DotGraph | |
Fields
|
A node in DotGraph
is either a singular node, or a cluster
containing nodes (or more clusters) within it.
At the moment, clusters are not parsed.
Constructors
DotNode | |
Fields
| |
DotCluster | |
Fields
|
An edge in DotGraph
.
Constructors
DotEdge | |
Fields
|
parseDotGraph :: Parse DotGraphSource
Parse a limited subset of the Dot language to form a DotGraph
(that is, the caveats listed in Data.GraphViz.Attributes aside,
Dot graphs are parsed if they match the layout of DotGraph).
makeStrict :: DotGraph -> DotGraphSource
A strict graph disallows multiple edges.
isValidGraph :: DotGraph -> BoolSource
Check if all the Attribute
s are being used correctly.