This class is used to provide a common interface to different ways of representing a graph in Dot form.
You will most probably not need to create your own instances of this class.
The type variable represents the current node type of the Dot graph, and the Ord restriction is there because in practice most implementations of some of these methods require it.
Methods
fromCanonical :: DotGraph n -> dg nConvert from a graph in canonical form. This is especially useful when using the functions from Data.GraphViz.Algorithms.
See
FromGeneralisedDotin Data.GraphViz.Types.Generalised for a semi-inverse of this function.getID :: dg n -> Maybe GraphIDReturn the ID of the graph.
setID :: GraphID -> dg n -> dg nSet the ID of the graph.
graphIsDirected :: dg n -> BoolIs this graph directed?
setIsDirected :: Bool -> dg n -> dg nSet whether a graph is directed or not.
graphIsStrict :: dg n -> BoolIs this graph strict? Strict graphs disallow multiple edges.
setStrictness :: Bool -> dg n -> dg nA strict graph disallows multiple edges.
mapDotGraph :: DotRepr dg n' => (n -> n') -> dg n -> dg n'Change the node values. This function is assumed to be injective, otherwise the resulting graph will not be identical to the original (modulo labels).
graphStructureInformation :: dg n -> (GlobalAttributes, ClusterLookup)Return information on all the clusters contained within this DotRepr, as well as the top-level GraphAttrs for the overall graph.
nodeInformation :: Bool -> dg n -> NodeLookup nedgeInformation :: Bool -> dg n -> [DotEdge n]unAnonymise :: dg n -> dg nGive any anonymous sub-graphs or clusters a unique identifier (i.e. there will be no Nothing key in the ClusterLookup from graphStructureInformation).