Show / Hide Table of Contents

Class DelegateIncidenceGraph<TVertex, TEdge>

A delegate-based directed incidence graph data structure.

Inheritance
System.Object
DelegateImplicitGraph<TVertex, TEdge>
DelegateIncidenceGraph<TVertex, TEdge>
DelegateBidirectionalIncidenceGraph<TVertex, TEdge>
DelegateVertexAndEdgeListGraph<TVertex, TEdge>
Implements
IIncidenceGraph<TVertex, TEdge>
IImplicitGraph<TVertex, TEdge>
IGraph<TVertex, TEdge>
IImplicitVertexSet<TVertex>
Inherited Members
DelegateImplicitGraph<TVertex, TEdge>.IsDirected
DelegateImplicitGraph<TVertex, TEdge>.AllowParallelEdges
DelegateImplicitGraph<TVertex, TEdge>.IsOutEdgesEmpty(TVertex)
DelegateImplicitGraph<TVertex, TEdge>.OutDegree(TVertex)
DelegateImplicitGraph<TVertex, TEdge>.OutEdges(TVertex)
DelegateImplicitGraph<TVertex, TEdge>.TryGetOutEdges(TVertex, IEnumerable<TEdge>)
DelegateImplicitGraph<TVertex, TEdge>.OutEdge(TVertex, Int32)
DelegateImplicitGraph<TVertex, TEdge>.ContainsVertex(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 DelegateIncidenceGraph<TVertex, TEdge> : DelegateImplicitGraph<TVertex, TEdge>, IIncidenceGraph<TVertex, TEdge>, IImplicitGraph<TVertex, TEdge>, IGraph<TVertex, TEdge>, IImplicitVertexSet<TVertex> where TEdge : IEdge<TVertex>
Type Parameters
Name Description
TVertex

Vertex type.

TEdge

Edge type.

Constructors

| Improve this Doc View Source

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

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

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

Getter of out-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

tryGetOutEdges is null.

Methods

| Improve this Doc View Source

ContainsEdge(TVertex, TVertex)

Checks if this graph contains an edge that link source and target vertices.

Declaration
public bool ContainsEdge(TVertex source, TVertex target)
Parameters
Type Name Description
TVertex source

Source vertex.

TVertex target

Target vertex.

Returns
Type Description
System.Boolean

True if an edge exists, false otherwise.

Exceptions
Type Condition
System.ArgumentNullException

source is null.

System.ArgumentNullException

target is null.

| Improve this Doc View Source

TryGetEdge(TVertex, TVertex, out TEdge)

Tries to get the edge that link source and target vertices.

Declaration
public bool TryGetEdge(TVertex source, TVertex target, out TEdge edge)
Parameters
Type Name Description
TVertex source

Source vertex.

TVertex target

Target vertex.

TEdge edge

Edge found, otherwise null.

Returns
Type Description
System.Boolean

True if an edge was found, false otherwise.

Exceptions
Type Condition
System.ArgumentNullException

source is null.

System.ArgumentNullException

target is null.

| Improve this Doc View Source

TryGetEdges(TVertex, TVertex, out IEnumerable<TEdge>)

Tries to get edges that link source and target vertices.

Declaration
public bool TryGetEdges(TVertex source, TVertex target, out IEnumerable<TEdge> edges)
Parameters
Type Name Description
TVertex source

Source vertex.

TVertex target

Target vertex.

System.Collections.Generic.IEnumerable<TEdge> edges

Edges found, otherwise null.

Returns
Type Description
System.Boolean

True if at least an edge was found, false otherwise.

Exceptions
Type Condition
System.ArgumentNullException

source is null.

System.ArgumentNullException

target is null.

Implements

IIncidenceGraph<TVertex, TEdge>
IImplicitGraph<TVertex, TEdge>
IGraph<TVertex, TEdge>
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>)
  • Improve this Doc
  • View Source
In This Article
Back to top QuikGraph