Class EquateGraphs
Equality helpers for graphs.
Inheritance
System.Object
EquateGraphs
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
Assembly: QuikGraph.dll
Syntax
public static class EquateGraphs
Methods
| Improve this Doc View SourceEquate<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, IEdgeListGraph<TVertex, TEdge>)
Checks if both graphs g
and h
content are equal.
Uses the default comparer for vertices and edges.
Declaration
public static bool Equate<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge> g, IEdgeListGraph<TVertex, TEdge> h)
where TEdge : IEdge<TVertex>
Parameters
Type | Name | Description |
---|---|---|
IEdgeListGraph<TVertex, TEdge> | g | First graph to compare. |
IEdgeListGraph<TVertex, TEdge> | h | Second graph to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if both graphs are equal, false otherwise. |
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
Equate<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge>, IEdgeListGraph<TVertex, TEdge>, IEqualityComparer<TVertex>, IEqualityComparer<TEdge>)
Checks if both graphs g
and h
content are equal.
Uses the provided vertexEquality
and edgeEquality
comparer to respectively compare vertices and edges.
Declaration
public static bool Equate<TVertex, TEdge>(IEdgeListGraph<TVertex, TEdge> g, IEdgeListGraph<TVertex, TEdge> h, IEqualityComparer<TVertex> vertexEquality, IEqualityComparer<TEdge> edgeEquality)
where TEdge : IEdge<TVertex>
Parameters
Type | Name | Description |
---|---|---|
IEdgeListGraph<TVertex, TEdge> | g | First graph to compare. |
IEdgeListGraph<TVertex, TEdge> | h | Second graph to compare. |
System.Collections.Generic.IEqualityComparer<TVertex> | vertexEquality | Vertex equality comparer. |
System.Collections.Generic.IEqualityComparer<TEdge> | edgeEquality | Edge equality comparer. |
Returns
Type | Description |
---|---|
System.Boolean | True if both graphs are equal, false otherwise. |
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|