FilteredBidirectionalGraph bug?

Topics: bug, graph
Apr 23, 2009 at 11:23 AM
Hi,

The implementation of QuickGraph.Predicates.FilteredBidirectionalGraph.InEdges(TVertex v) is causing a stack overflow:

public IEnumerable<TEdge> InEdges(TVertex v)
        {
            foreach (var edge in this.InEdges(v))
...

I think two things should change:
1) The restrictions on TGraph should be:
        where TGraph : IBidirectionalGraph<TVertex, TEdge>
2) The InEdges(v) should call the BaseGraph's method, and filter the results:
      public IEnumerable<TEdge> InEdges(TVertex v)
        {
            foreach (var edge in this.BaseGraph.InEdges(v))

Regards,

Jan-Willem
Coordinator
Apr 24, 2009 at 12:25 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.