Interface IReadOnlyDigraph
- Namespace
- AlgorithmsSW.Digraph
- Assembly
- AlgorithmsSW.dll
public interface IReadOnlyDigraph : IEnumerable<(int vertex0, int vertex1)>, IEnumerable
- Inherited Members
- Extension Methods
Properties
EdgeCount
Gets the number of edges in the graph.
int EdgeCount { get; }
Property Value
Edges
IEnumerable<(int source, int target)> Edges { get; }
Property Value
- IEnumerable<(int source, int target)>
SupportsParallelEdges
bool SupportsParallelEdges { get; }
Property Value
SupportsSelfLoops
bool SupportsSelfLoops { get; }
Property Value
VertexCount
Gets the number of vertices in the graph.
int VertexCount { get; }
Property Value
Vertexes
Gets the vertices in the graph.
IEnumerable<int> Vertexes { get; }
Property Value
Methods
AreAdjacent(int, int)
bool AreAdjacent(int item1, int item2)
Parameters
Returns
AsText()
Creates a human-readable string representation of the graph.
string AsText()
Returns
- string
A string representing the graph's structure.
GetAdjacents(int)
Gets the adjacent vertices of a given vertex.
IEnumerable<int> GetAdjacents(int vertex)
Parameters
vertex
intThe vertex to find adjacents for.
Returns
- IEnumerable<int>
An enumerable of adjacent vertices.