Class MsaglGraphExtensions
Extensions related to MSAGL bridge.
Inheritance
Inherited Members
Namespace: QuikGraph.MSAGL
Assembly: QuikGraph.MSAGL.dll
Syntax
public static class MsaglGraphExtensions
Methods
| Improve this Doc View SourceCreateMsaglPopulator<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>)
Creates an MsaglGraphPopulator<TVertex, TEdge>.
Declaration
public static MsaglGraphPopulator<TVertex, TEdge> CreateMsaglPopulator<TVertex, TEdge>(this IEdgeListGraph<TVertex, TEdge> graph)
where TEdge : IEdge<TVertex>
Parameters
| Type | Name | Description |
|---|---|---|
| IEdgeListGraph<TVertex, TEdge> | graph | Graph to convert to MSAGL graph. |
Returns
| Type | Description |
|---|---|
| MsaglGraphPopulator<TVertex, TEdge> | Graph populator. |
Type Parameters
| Name | Description |
|---|---|
| TVertex | Vertex type. |
| TEdge | Edge type. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
CreateMsaglPopulator<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, VertexIdentity<TVertex>)
Creates an MsaglGraphPopulator<TVertex, TEdge>.
Declaration
public static MsaglGraphPopulator<TVertex, TEdge> CreateMsaglPopulator<TVertex, TEdge>(this IEdgeListGraph<TVertex, TEdge> graph, VertexIdentity<TVertex> vertexIdentity)
where TEdge : IEdge<TVertex>
Parameters
| Type | Name | Description |
|---|---|---|
| IEdgeListGraph<TVertex, TEdge> | graph | Graph to convert to MSAGL graph. |
| VertexIdentity<TVertex> | vertexIdentity | Delegate that given a vertex return its identifier. |
Returns
| Type | Description |
|---|---|
| MsaglGraphPopulator<TVertex, TEdge> | Graph populator. |
Type Parameters
| Name | Description |
|---|---|
| TVertex | Vertex type. |
| TEdge | Edge type. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
| System.ArgumentNullException |
|
CreateMsaglPopulator<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, String, IFormatProvider)
Creates an MsaglGraphPopulator<TVertex, TEdge>.
Declaration
public static MsaglGraphPopulator<TVertex, TEdge> CreateMsaglPopulator<TVertex, TEdge>(this IEdgeListGraph<TVertex, TEdge> graph, string format, IFormatProvider formatProvider = null)
where TEdge : IEdge<TVertex>
Parameters
| Type | Name | Description |
|---|---|---|
| IEdgeListGraph<TVertex, TEdge> | graph | Graph to convert to MSAGL graph. |
| System.String | format | Graph format. |
| System.IFormatProvider | formatProvider | Graph format provider. |
Returns
| Type | Description |
|---|---|
| MsaglGraphPopulator<TVertex, TEdge> | Graph populator. |
Type Parameters
| Name | Description |
|---|---|
| TVertex | Vertex type. |
| TEdge | Edge type. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
ToMsaglGraph<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, MsaglVertexNodeEventHandler<TVertex>, MsaglEdgeEventHandler<TVertex, TEdge>)
Converts graph to an Microsoft.Msagl.Drawing.Graph.
Declaration
public static Graph ToMsaglGraph<TVertex, TEdge>(this IEdgeListGraph<TVertex, TEdge> graph, MsaglVertexNodeEventHandler<TVertex> nodeAdded = null, MsaglEdgeEventHandler<TVertex, TEdge> edgeAdded = null)
where TEdge : IEdge<TVertex>
Parameters
| Type | Name | Description |
|---|---|---|
| IEdgeListGraph<TVertex, TEdge> | graph | Graph to convert to MSAGL graph. |
| MsaglVertexNodeEventHandler<TVertex> | nodeAdded | Node added delegate. |
| MsaglEdgeEventHandler<TVertex, TEdge> | edgeAdded | Edge added delegate. |
Returns
| Type | Description |
|---|---|
| Microsoft.Msagl.Drawing.Graph | MSAGL Graph. |
Type Parameters
| Name | Description |
|---|---|
| TVertex | Vertex type. |
| TEdge | Edge type. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
ToMsaglGraph<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, VertexIdentity<TVertex>, MsaglVertexNodeEventHandler<TVertex>, MsaglEdgeEventHandler<TVertex, TEdge>)
Converts graph to an Microsoft.Msagl.Drawing.Graph.
Declaration
public static Graph ToMsaglGraph<TVertex, TEdge>(this IEdgeListGraph<TVertex, TEdge> graph, VertexIdentity<TVertex> vertexIdentity, MsaglVertexNodeEventHandler<TVertex> nodeAdded = null, MsaglEdgeEventHandler<TVertex, TEdge> edgeAdded = null)
where TEdge : IEdge<TVertex>
Parameters
| Type | Name | Description |
|---|---|---|
| IEdgeListGraph<TVertex, TEdge> | graph | Graph to convert to MSAGL graph. |
| VertexIdentity<TVertex> | vertexIdentity | Delegate that given a vertex return its identifier. |
| MsaglVertexNodeEventHandler<TVertex> | nodeAdded | Node added delegate. |
| MsaglEdgeEventHandler<TVertex, TEdge> | edgeAdded | Edge added delegate. |
Returns
| Type | Description |
|---|---|
| Microsoft.Msagl.Drawing.Graph | MSAGL Graph. |
Type Parameters
| Name | Description |
|---|---|
| TVertex | Vertex type. |
| TEdge | Edge type. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
| System.ArgumentNullException |
|