-
Notifications
You must be signed in to change notification settings - Fork 200
Walking Graphs
Andrey Vernigora edited this page Feb 2, 2019
·
3 revisions
Use the Vertices
property to get an enumerable collection of vertices:
foreach(var v in g.Vertices)
Console.WriteLine(v);
Use the Edges
property get an enumerable collection of edges:
foreach(var e in g.Edges)
Console.WriteLine(e);
The OutEdges
method returns an enumerable collection of out-edges:
foreach(var v in g.Vertices)
foreach(var e in g.OutEdges(v))
Console.WriteLine(e);
Similarly, InEdges
returns an enumerable collection of in-edges.