-
Notifications
You must be signed in to change notification settings - Fork 2
Walking Graphs
Mark Junker edited this page Jun 7, 2018
·
1 revision
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.