forked from YaccConstructor/QuickGraph
-
-
Notifications
You must be signed in to change notification settings - Fork 71
Walking Graphs
Alexandre Rabérin edited this page May 12, 2020
·
1 revision
Use the Vertices
property to get an enumerable collection of vertices:
foreach(var vertex in graph.Vertices)
{
Console.WriteLine(vertex);
}
Use the Edges
property get an enumerable collection of edges:
foreach(var edge in graph.Edges)
{
Console.WriteLine(edge);
}
The OutEdges
method returns an enumerable collection of out-edges:
foreach(var vertex in graph.Vertices)
{
foreach(var edge in graph.OutEdges(vertex))
{
Console.WriteLine(edge);
}
}
Similarly, InEdges
returns an enumerable collection of in-edges.