forked from YaccConstructor/QuickGraph
-
-
Notifications
You must be signed in to change notification settings - Fork 71
BidirectionalGraphAdapter
Alexandre Rabérin edited this page May 11, 2020
·
1 revision
The BidirectionalGraphAdapter<TVertex, TEdge>
provides a wrapper around an adjacency graph in order to adpat it as a bidirectional one.
This class is not really mutable, serializable and cloneable.
var graph = new AdjacencyGraph<int, Edge<int>>();
var adapterGraph = new BidirectionalGraphAdapter<int, Edge<int>>(graph);
...
foreach(int vertex in adapterGraph.Vertices)
{
foreach(Edge<int> edge in graph.InEdges(vertex))
{
Console.WriteLine(edge);
}
}
Depending on your needs it may be interessant to use the BidirectionalGraph.