public void Test(Dictionary <string, HashSet <SimpleEdge> > graph, Dictionary <string, int> expected) { maxFlowFinder = new MaxFlowFinder(); maxFlowFinder.Graph = graph; Assert.True(maxFlowFinder.Bfs()); //yeah this could be better Assert.Equal(expected, maxFlowFinder.Levels); }
public void Test(Dictionary <string, HashSet <SimpleEdge> > graph, long expectedFlow) { maxFlowFinder = new MaxFlowFinder(); maxFlowFinder.Graph = graph; maxFlowFinder.Bfs(); var reveresedEdgesToAdd = new HashSet <SimpleEdge>(); Assert.Equal(expectedFlow, maxFlowFinder.SendFlow("s", new List <SimpleEdge>(), ref reveresedEdgesToAdd)); }