Interface IImplicitUndirectedGraph<TVertex, TEdge>
An implicit undirected graph with vertices of type TVertex
and edges of type TEdge
.
Inherited Members
Namespace: QuikGraph
Assembly: QuikGraph.dll
Syntax
public interface IImplicitUndirectedGraph<TVertex, TEdge> : IImplicitVertexSet<TVertex>, IGraph<TVertex, TEdge> where TEdge : IEdge<TVertex>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
Properties
| Improve this Doc View SourceEdgeEqualityComparer
Comparer for edges.
Declaration
EdgeEqualityComparer<TVertex> EdgeEqualityComparer { get; }
Property Value
Type | Description |
---|---|
EdgeEqualityComparer<TVertex> |
Methods
| Improve this Doc View SourceAdjacentDegree(TVertex)
Gives the adjacent degree of the given vertex
.
Declaration
int AdjacentDegree(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
Returns
Type | Description |
---|---|
System.Int32 | Vertex adjacent degree. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
VertexNotFoundException |
|
AdjacentEdge(TVertex, Int32)
Gets the index
th adjacent edge of the given vertex
.
Declaration
TEdge AdjacentEdge(TVertex vertex, int index)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
System.Int32 | index | Index of the adjacent edge requested. |
Returns
Type | Description |
---|---|
TEdge | The adjacent edge. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentOutOfRangeException | No vertex at |
VertexNotFoundException |
|
AdjacentEdges(TVertex)
Gives the enumerable of edges adjacent to the given vertex
.
Declaration
IEnumerable<TEdge> AdjacentEdges(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEdge> | Enumerable of adjacent edges. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
VertexNotFoundException |
|
ContainsEdge(TVertex, TVertex)
Checks if this graph contains an edge that link
source
and target
vertices.
Declaration
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 |
|
System.ArgumentNullException |
|
IsAdjacentEdgesEmpty(TVertex)
Indicates if the given vertex
has at least one adjacent edge.
Declaration
bool IsAdjacentEdgesEmpty(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
Returns
Type | Description |
---|---|
System.Boolean | True if the vertex has at least one adjacent edge, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
VertexNotFoundException |
|
TryGetEdge(TVertex, TVertex, out TEdge)
Tries to get the edge that link
source
and target
vertices.
Declaration
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 |
|
System.ArgumentNullException |
|