The UndirectedBidirectionalGraph<TVertex, TEdge> provides a wrapper around a bidirectional graph in order to adapt it as an undirected graph.
UndirectedBidirectionalGraph<TVertex, TEdge>
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); } }
There was an error while loading. Please reload this page.