Show / Hide Table of Contents

Class DelegateUndirectedGraph<TVertex, TEdge>

A delegate-based undirected graph data structure. This graph is vertex immutable.

Inheritance
System.Object
DelegateImplicitUndirectedGraph<TVertex, TEdge>
DelegateUndirectedGraph<TVertex, TEdge>
Implements
IUndirectedGraph<TVertex, TEdge>
IImplicitUndirectedGraph<TVertex, TEdge>
IEdgeListGraph<TVertex, TEdge>
IGraph<TVertex, TEdge>
IEdgeSet<TVertex, TEdge>
IVertexSet<TVertex>
IImplicitVertexSet<TVertex>
Inherited Members
DelegateImplicitUndirectedGraph<TVertex, TEdge>.EdgeEqualityComparer
DelegateImplicitUndirectedGraph<TVertex, TEdge>.IsDirected
DelegateImplicitUndirectedGraph<TVertex, TEdge>.AllowParallelEdges
DelegateImplicitUndirectedGraph<TVertex, TEdge>.ContainsVertex(TVertex)
DelegateImplicitUndirectedGraph<TVertex, TEdge>.AdjacentDegree(TVertex)
DelegateImplicitUndirectedGraph<TVertex, TEdge>.IsAdjacentEdgesEmpty(TVertex)
DelegateImplicitUndirectedGraph<TVertex, TEdge>.AdjacentEdges(TVertex)
DelegateImplicitUndirectedGraph<TVertex, TEdge>.AdjacentEdge(TVertex, Int32)
DelegateImplicitUndirectedGraph<TVertex, TEdge>.TryGetEdge(TVertex, TVertex, TEdge)
DelegateImplicitUndirectedGraph<TVertex, TEdge>.TryGetAdjacentEdges(TVertex, IEnumerable<TEdge>)
DelegateImplicitUndirectedGraph<TVertex, TEdge>.ContainsEdge(TVertex, TVertex)
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
Assembly: QuikGraph.dll
Syntax
public class DelegateUndirectedGraph<TVertex, TEdge> : DelegateImplicitUndirectedGraph<TVertex, TEdge>, IUndirectedGraph<TVertex, TEdge>, IImplicitUndirectedGraph<TVertex, TEdge>, IEdgeListGraph<TVertex, TEdge>, IGraph<TVertex, TEdge>, IEdgeSet<TVertex, TEdge>, IVertexSet<TVertex>, IImplicitVertexSet<TVertex> where TEdge : IEdge<TVertex>
Type Parameters
Name Description
TVertex

Vertex type.

TEdge

Edge type.

Constructors

| Improve this Doc View Source

DelegateUndirectedGraph(IEnumerable<TVertex>, TryFunc<TVertex, IEnumerable<TEdge>>, Boolean)

Initializes a new instance of the DelegateUndirectedGraph<TVertex, TEdge> class.

Declaration
public DelegateUndirectedGraph(IEnumerable<TVertex> vertices, TryFunc<TVertex, IEnumerable<TEdge>> tryGetAdjacentEdges, bool allowParallelEdges = true)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<TVertex> vertices

Graph vertices.

TryFunc<TVertex, System.Collections.Generic.IEnumerable<TEdge>> tryGetAdjacentEdges

Getter of adjacent edges.

System.Boolean allowParallelEdges

Indicates if parallel edges are allowed. Note that get of edges is delegated so you may have bugs related to parallel edges due to the delegated implementation.

Exceptions
Type Condition
System.ArgumentNullException

vertices is null.

System.ArgumentNullException

tryGetAdjacentEdges is null.

Properties

| Improve this Doc View Source

EdgeCount

Gets the edge count.

Declaration
public int EdgeCount { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Edges

Gets the edges.

Declaration
public virtual IEnumerable<TEdge> Edges { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<TEdge>
| Improve this Doc View Source

IsEdgesEmpty

Gets a value indicating whether there are no edges in this set. It is true if this edge set is empty, otherwise false.

Declaration
public bool IsEdgesEmpty { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsVerticesEmpty

Gets a value indicating whether there are no vertices in this set. It is true if this vertex set is empty, otherwise false.

Declaration
public bool IsVerticesEmpty { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

VertexCount

Gets the vertex count.

Declaration
public int VertexCount { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Vertices

Gets the vertices.

Declaration
public virtual IEnumerable<TVertex> Vertices { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<TVertex>

Methods

| Improve this Doc View Source

ContainsEdge(TEdge)

Determines whether this set contains the specified edge.

Declaration
public bool ContainsEdge(TEdge edge)
Parameters
Type Name Description
TEdge edge

Edge to check.

Returns
Type Description
System.Boolean

True if the specified edge is contained in this set, false otherwise.

Exceptions
Type Condition
System.ArgumentNullException

edge is null.

Implements

IUndirectedGraph<TVertex, TEdge>
IImplicitUndirectedGraph<TVertex, TEdge>
IEdgeListGraph<TVertex, TEdge>
IGraph<TVertex, TEdge>
IEdgeSet<TVertex, TEdge>
IVertexSet<TVertex>
IImplicitVertexSet<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.SerializeToBinary<TVertex, TEdge>(IGraph<TVertex, TEdge>, Stream)
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>)
GraphExtensions.ToBidirectionalGraph<TVertex, TEdge>(IUndirectedGraph<TVertex, TEdge>)
GraphExtensions.ToArrayUndirectedGraph<TVertex, TEdge>(IUndirectedGraph<TVertex, TEdge>)
AlgorithmExtensions.GetVertexIdentity<TVertex>(IVertexSet<TVertex>)
AlgorithmExtensions.GetEdgeIdentity<TVertex, TEdge>(IEdgeSet<TVertex, TEdge>)
AlgorithmExtensions.ShortestPathsDijkstra<TVertex, TEdge>(IUndirectedGraph<TVertex, TEdge>, Func<TEdge, Double>, TVertex)
AlgorithmExtensions.TopologicalSort<TVertex, TEdge>(IUndirectedGraph<TVertex, TEdge>)
AlgorithmExtensions.SourceFirstTopologicalSort<TVertex, TEdge>(IUndirectedGraph<TVertex, TEdge>)
AlgorithmExtensions.ConnectedComponents<TVertex, TEdge>(IUndirectedGraph<TVertex, TEdge>, IDictionary<TVertex, Int32>)
AlgorithmExtensions.IsUndirectedAcyclicGraph<TVertex, TEdge>(IUndirectedGraph<TVertex, TEdge>)
AlgorithmExtensions.ComputeDisjointSet<TVertex, TEdge>(IUndirectedGraph<TVertex, TEdge>)
AlgorithmExtensions.MinimumSpanningTreePrim<TVertex, TEdge>(IUndirectedGraph<TVertex, TEdge>, Func<TEdge, Double>)
AlgorithmExtensions.MinimumSpanningTreeKruskal<TVertex, TEdge>(IUndirectedGraph<TVertex, TEdge>, Func<TEdge, Double>)
AlgorithmExtensions.ComputeTransitiveReduction<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>)
AlgorithmExtensions.ComputeTransitiveClosure<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, Func<TVertex, TVertex, TEdge>)
GraphvizExtensions.ToGraphviz<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>)
GraphvizExtensions.ToGraphviz<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, Action<GraphvizAlgorithm<TVertex, TEdge>>)
GraphvizExtensions.ToSvg<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>)
GraphvizExtensions.ToSvg<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, Action<GraphvizAlgorithm<TVertex, TEdge>>)
MsaglGraphExtensions.CreateMsaglPopulator<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>)
MsaglGraphExtensions.CreateMsaglPopulator<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, String, IFormatProvider)
MsaglGraphExtensions.CreateMsaglPopulator<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, VertexIdentity<TVertex>)
MsaglGraphExtensions.ToMsaglGraph<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, MsaglVertexNodeEventHandler<TVertex>, MsaglEdgeEventHandler<TVertex, TEdge>)
MsaglGraphExtensions.ToMsaglGraph<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, VertexIdentity<TVertex>, MsaglVertexNodeEventHandler<TVertex>, MsaglEdgeEventHandler<TVertex, TEdge>)
  • Improve this Doc
  • View Source
In This Article
Back to top QuikGraph