Maintainer | [email protected] |
---|---|
Safe Haskell | Safe-Infered |
Data.GraphViz.Algorithms
Description
Defines various algorithms for use on DotRepr
graphs. These are
typically re-implementations of behaviour found in existing Graphviz
tools but without the I/O requirement.
- data CanonicaliseOptions = COpts {}
- defaultCanonOptions :: CanonicaliseOptions
- dotLikeOptions :: CanonicaliseOptions
- canonicalise :: DotRepr dg n => dg n -> DotGraph n
- canonicaliseOptions :: DotRepr dg n => CanonicaliseOptions -> dg n -> DotGraph n
- transitiveReduction :: DotRepr dg n => dg n -> DotGraph n
- transitiveReductionOptions :: DotRepr dg n => CanonicaliseOptions -> dg n -> DotGraph n
Canonicalisation Options
For simplicity, many algorithms end up using the canonicalisation
functions to create the new DotGraph
. CanonicaliseOptions
allows
you to configure how the output is generated.
data CanonicaliseOptions Source
Constructors
COpts | |
Fields
|
dotLikeOptions :: CanonicaliseOptionsSource
Options that are more like how dot -Tcanon
works.
Canonicalisation
canonicalise :: DotRepr dg n => dg n -> DotGraph nSource
Implements similar functionality to dot -Tcanon
. However, this
method requires no IO and doesn't care about image locations, etc.
This function will create a single explicit definition for every node in the original graph and place it in the appropriate position in the cluster hierarchy. All edges are found in the deepest cluster that contains both nodes. Currently node and edge attributes are not grouped into global ones.
canonicaliseOptions :: DotRepr dg n => CanonicaliseOptions -> dg n -> DotGraph nSource
As with canonicalise
, but allow custom CanonicaliseOptions
.
Dealing with transitive edges
transitiveReduction :: DotRepr dg n => dg n -> DotGraph nSource
transitiveReductionOptions :: DotRepr dg n => CanonicaliseOptions -> dg n -> DotGraph nSource