Class GraphvizAlgorithm<TVertex, TEdge>
An algorithm that renders a graph to the Graphviz DOT format.
Inherited Members
Namespace: QuikGraph.Graphviz
Assembly: QuikGraph.Graphviz.dll
Syntax
public class GraphvizAlgorithm<TVertex, TEdge>
    where TEdge : IEdge<TVertex>Type Parameters
| Name | Description | 
|---|---|
| TVertex | Vertex type. | 
| TEdge | Edge type. | 
Constructors
| Improve this Doc View SourceGraphvizAlgorithm(IEdgeListGraph<TVertex, TEdge>)
Initializes a new instance of the GraphvizAlgorithm<TVertex, TEdge> class.
Declaration
public GraphvizAlgorithm(IEdgeListGraph<TVertex, TEdge> graph)Parameters
| Type | Name | Description | 
|---|---|---|
| IEdgeListGraph<TVertex, TEdge> | graph | Graph to convert to DOT. | 
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException | 
 | 
GraphvizAlgorithm(IEdgeListGraph<TVertex, TEdge>, GraphvizImageType)
Initializes a new instance of the GraphvizAlgorithm<TVertex, TEdge> class.
Declaration
public GraphvizAlgorithm(IEdgeListGraph<TVertex, TEdge> graph, GraphvizImageType imageType)Parameters
| Type | Name | Description | 
|---|---|---|
| IEdgeListGraph<TVertex, TEdge> | graph | Graph to convert to DOT. | 
| GraphvizImageType | imageType | Target output image type. | 
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException | 
 | 
Properties
| Improve this Doc View SourceCommonEdgeFormat
Common edge format.
Declaration
public GraphvizEdge CommonEdgeFormat { get; }Property Value
| Type | Description | 
|---|---|
| GraphvizEdge | 
CommonVertexFormat
Common vertex format.
Declaration
public GraphvizVertex CommonVertexFormat { get; }Property Value
| Type | Description | 
|---|---|
| GraphvizVertex | 
GraphFormat
Graph format.
Declaration
public GraphvizGraph GraphFormat { get; }Property Value
| Type | Description | 
|---|---|
| GraphvizGraph | 
ImageType
Current image output type.
Declaration
public GraphvizImageType ImageType { get; set; }Property Value
| Type | Description | 
|---|---|
| GraphvizImageType | 
Output
Dot output stream.
Declaration
public StringWriter Output { get; }Property Value
| Type | Description | 
|---|---|
| System.IO.StringWriter | 
Remarks
Not null after a run of Generate() or Generate(IDotEngine, String).
VisitedGraph
Graph to convert.
Declaration
public IEdgeListGraph<TVertex, TEdge> VisitedGraph { get; set; }Property Value
| Type | Description | 
|---|---|
| IEdgeListGraph<TVertex, TEdge> | 
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException | Set value is null. | 
Methods
| Improve this Doc View SourceGenerate()
Generates the DOT corresponding to VisitedGraph.
Declaration
public string Generate()Returns
| Type | Description | 
|---|---|
| System.String | DOT serialization of VisitedGraph. | 
Generate(IDotEngine, String)
Generates the DOT corresponding to VisitedGraph using dot engine
and puts result in outputFilePath.
Declaration
public string Generate(IDotEngine dot, string outputFilePath)Parameters
| Type | Name | Description | 
|---|---|---|
| IDotEngine | dot | |
| System.String | outputFilePath | 
Returns
| Type | Description | 
|---|---|
| System.String | File path containing DOT serialization of VisitedGraph. | 
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException | 
 | 
| System.ArgumentException | 
 | 
Events
| Improve this Doc View SourceFormatCluster
Fired when formatting a clustered graph.
Declaration
public event FormatClusterEventHandler<TVertex, TEdge> FormatClusterEvent Type
| Type | Description | 
|---|---|
| FormatClusterEventHandler<TVertex, TEdge> | 
FormatEdge
Fired when formatting an edge.
Declaration
public event FormatEdgeAction<TVertex, TEdge> FormatEdgeEvent Type
| Type | Description | 
|---|---|
| FormatEdgeAction<TVertex, TEdge> | 
FormatVertex
Fired when formatting a vertex.
Declaration
public event FormatVertexEventHandler<TVertex> FormatVertexEvent Type
| Type | Description | 
|---|---|
| FormatVertexEventHandler<TVertex> |