Interface IGraph<T>
Interface describing a generic graph.
Assembly: Edgar.dll
Syntax
public interface IGraph<T>
Type Parameters
Properties
Edges
Gets all edges of the graph.
Declaration
IEnumerable<IEdge<T>> Edges { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<IEdge<T>> |
|
IsDirected
Checks if the graph is directed.
Declaration
Property Value
Type |
Description |
System.Boolean |
|
Vertices
Gets all vertices of the graph.
Declaration
IEnumerable<T> Vertices { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
VerticesCount
Gets the total number of vertices.
Declaration
int VerticesCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
AddEdge(T, T)
Declaration
void AddEdge(T from, T to)
Parameters
Type |
Name |
Description |
T |
from |
|
T |
to |
|
AddVertex(T)
Declaration
Parameters
Type |
Name |
Description |
T |
vertex |
|
GetNeighbours(T)
Gets all neighbours of a given vertex.
Declaration
IEnumerable<T> GetNeighbours(T vertex)
Parameters
Type |
Name |
Description |
T |
vertex |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
HasEdge(T, T)
Checks whether there exists a given edge.
Declaration
bool HasEdge(T from, T to)
Parameters
Type |
Name |
Description |
T |
from |
|
T |
to |
|
Returns
Type |
Description |
System.Boolean |
|