Interface IBidirectionalIncidenceGraph<TVertex, TEdge>
A incident directed graph with vertices of type TVertex
and edges of type TEdge
, that is efficient
to traverse both in and out edges.
Inherited Members
Namespace: QuikGraph
Assembly: QuikGraph.dll
Syntax
public interface IBidirectionalIncidenceGraph<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. |
Methods
| Improve this Doc View SourceDegree(TVertex)
Gets the degree of vertex
, i.e.
the sum of the out-degree and in-degree of vertex
.
Declaration
int Degree(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
Returns
Type | Description |
---|---|
System.Int32 | The sum of OutDegree and InDegree of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
VertexNotFoundException |
|
InDegree(TVertex)
Gets the number of in-edges of vertex
.
Declaration
int InDegree(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
Returns
Type | Description |
---|---|
System.Int32 | The number of in-edges pointing towards |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
VertexNotFoundException |
|
InEdge(TVertex, Int32)
Gets the in-edge at location index
.
Declaration
TEdge InEdge(TVertex vertex, int index)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
System.Int32 | index | The index. |
Returns
Type | Description |
---|---|
TEdge | The in-edge at position |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentOutOfRangeException | No vertex at |
VertexNotFoundException |
|
InEdges(TVertex)
Gets the collection of in-edges of vertex
.
Declaration
IEnumerable<TEdge> InEdges(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEdge> | The collection of in-edges of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
VertexNotFoundException |
|
IsInEdgesEmpty(TVertex)
Determines whether vertex
has no in-edges.
Declaration
bool IsInEdgesEmpty(TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
Returns
Type | Description |
---|---|
System.Boolean | True if |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
VertexNotFoundException |
|
TryGetInEdges(TVertex, out IEnumerable<TEdge>)
Tries to get the in-edges of vertex
.
Declaration
bool TryGetInEdges(TVertex vertex, out IEnumerable<TEdge> edges)
Parameters
Type | Name | Description |
---|---|---|
TVertex | vertex | The vertex. |
System.Collections.Generic.IEnumerable<TEdge> | edges | In-edges. |
Returns
Type | Description |
---|---|
System.Boolean | True if |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|