BidirectionalGraphAdapter - KeRNeLith/QuikGraph GitHub Wiki

BidirectionalGraphAdapter

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.

⚠️ **GitHub.com Fallback** ⚠️