Interface IDirectedGraph<TVertex, TEdge>
- Namespace
- Graph1x
- Assembly
- Graph1x.dll
A graph whose edges are directed, adding in/out refinements of the undirected structural queries.
public interface IDirectedGraph<TVertex, TEdge> : IReadOnlyGraph<TVertex, TEdge> where TVertex : notnull where TEdge : IEdge<TVertex>
Type Parameters
TVertexThe vertex type.
TEdgeThe edge type.
- Inherited Members
- Extension Methods
Methods
InDegree(TVertex)
Gets the number of edges entering vertex.
int InDegree(TVertex vertex)
Parameters
vertexTVertexThe vertex to measure.
Returns
- int
The in-degree.
Exceptions
- ArgumentException
The vertex is not in the graph.
InEdges(TVertex)
Gets the edges entering vertex.
IEnumerable<TEdge> InEdges(TVertex vertex)
Parameters
vertexTVertexThe vertex whose incoming edges to enumerate.
Returns
- IEnumerable<TEdge>
The incoming edges.
Exceptions
- ArgumentException
The vertex is not in the graph.
OutDegree(TVertex)
Gets the number of edges leaving vertex.
int OutDegree(TVertex vertex)
Parameters
vertexTVertexThe vertex to measure.
Returns
- int
The out-degree.
Exceptions
- ArgumentException
The vertex is not in the graph.
OutEdges(TVertex)
Gets the edges leaving vertex.
IEnumerable<TEdge> OutEdges(TVertex vertex)
Parameters
vertexTVertexThe vertex whose outgoing edges to enumerate.
Returns
- IEnumerable<TEdge>
The outgoing edges.
Exceptions
- ArgumentException
The vertex is not in the graph.