Show / Hide Table of Contents

Class GraphvizAlgorithm<TVertex, TEdge>

An algorithm that renders a graph to the Graphviz DOT format.

Inheritance
System.Object
GraphvizAlgorithm<TVertex, TEdge>
DataSetGraphvizAlgorithm
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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 Source

GraphvizAlgorithm(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

graph is null.

| Improve this Doc View Source

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

graph is null.

Properties

| Improve this Doc View Source

CommonEdgeFormat

Common edge format.

Declaration
public GraphvizEdge CommonEdgeFormat { get; }
Property Value
Type Description
GraphvizEdge
| Improve this Doc View Source

CommonVertexFormat

Common vertex format.

Declaration
public GraphvizVertex CommonVertexFormat { get; }
Property Value
Type Description
GraphvizVertex
| Improve this Doc View Source

GraphFormat

Graph format.

Declaration
public GraphvizGraph GraphFormat { get; }
Property Value
Type Description
GraphvizGraph
| Improve this Doc View Source

ImageType

Current image output type.

Declaration
public GraphvizImageType ImageType { get; set; }
Property Value
Type Description
GraphvizImageType
| Improve this Doc View Source

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).

| Improve this Doc View Source

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 Source

Generate()

Generates the DOT corresponding to VisitedGraph.

Declaration
public string Generate()
Returns
Type Description
System.String

DOT serialization of VisitedGraph.

| Improve this Doc View Source

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

dot is null.

System.ArgumentException

outputFilePath is null or empty.

Events

| Improve this Doc View Source

FormatCluster

Fired when formatting a clustered graph.

Declaration
public event FormatClusterEventHandler<TVertex, TEdge> FormatCluster
Event Type
Type Description
FormatClusterEventHandler<TVertex, TEdge>
| Improve this Doc View Source

FormatEdge

Fired when formatting an edge.

Declaration
public event FormatEdgeAction<TVertex, TEdge> FormatEdge
Event Type
Type Description
FormatEdgeAction<TVertex, TEdge>
| Improve this Doc View Source

FormatVertex

Fired when formatting a vertex.

Declaration
public event FormatVertexEventHandler<TVertex> FormatVertex
Event Type
Type Description
FormatVertexEventHandler<TVertex>

Extension Methods

GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, String)
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, String, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>)
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, XmlWriter)
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, XmlWriter, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>)
GraphMLExtensions.DeserializeFromGraphML<TVertex, TEdge, TGraph>(TGraph, XmlReader, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
GraphMLExtensions.DeserializeFromGraphML<TVertex, TEdge, TGraph>(TGraph, TextReader, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
GraphMLExtensions.DeserializeFromGraphML<TVertex, TEdge, TGraph>(TGraph, String, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
GraphMLExtensions.DeserializeAndValidateFromGraphML<TVertex, TEdge, TGraph>(TGraph, TextReader, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
SerializationExtensions.SerializeToXml<TVertex, TEdge, TGraph>(TGraph, XmlWriter, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>, String, String, String, String)
SerializationExtensions.SerializeToXml<TVertex, TEdge, TGraph>(TGraph, XmlWriter, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>, String, String, String, String, Action<XmlWriter, TGraph>, Action<XmlWriter, TVertex>, Action<XmlWriter, TEdge>)
  • Improve this Doc
  • View Source
In This Article
Back to top QuikGraph