Table of Contents

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

TVertex

The vertex type.

TEdge

The edge type.

Inherited Members
Extension Methods

Methods

InDegree(TVertex)

Gets the number of edges entering vertex.

int InDegree(TVertex vertex)

Parameters

vertex TVertex

The 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

vertex TVertex

The 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

vertex TVertex

The 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

vertex TVertex

The vertex whose outgoing edges to enumerate.

Returns

IEnumerable<TEdge>

The outgoing edges.

Exceptions

ArgumentException

The vertex is not in the graph.