Table of Contents

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

int

Edges

IEnumerable<(int source, int target)> Edges { get; }

Property Value

IEnumerable<(int source, int target)>

SupportsParallelEdges

bool SupportsParallelEdges { get; }

Property Value

bool

SupportsSelfLoops

bool SupportsSelfLoops { get; }

Property Value

bool

VertexCount

Gets the number of vertices in the graph.

int VertexCount { get; }

Property Value

int

Vertexes

Gets the vertices in the graph.

IEnumerable<int> Vertexes { get; }

Property Value

IEnumerable<int>

Methods

AreAdjacent(int, int)

bool AreAdjacent(int item1, int item2)

Parameters

item1 int
item2 int

Returns

bool

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 int

The vertex to find adjacents for.

Returns

IEnumerable<int>

An enumerable of adjacent vertices.