forked from YaccConstructor/QuickGraph
-
-
Notifications
You must be signed in to change notification settings - Fork 71
UndirectedBidirectionalGraph
Alexandre Rabérin edited this page May 11, 2020
·
1 revision
The UndirectedBidirectionalGraph<TVertex, TEdge>
provides a wrapper around a bidirectional graph in order to adapt it as an undirected graph.
This class is mutable via the wrapped graph, serializable and cloneable.
var graph = new BidirectionalGraph<int, Edge<int>>();
var adapterGraph = new UndirectedBidirectionalGraph<int, Edge<int>>(graph);
...
foreach(int vertex in adapterGraph.Vertices)
{
foreach(Edge<int> edge in graph.AdjacentEdges(vertex))
{
Console.WriteLine(edge);
}
}