public ActionResult <long> Flow([FromBody] Tuple <List <string>, List <string> > sourceAndDestinationId)
        {
            var maxFlowFinder = new MaxFlowFinder();

            maxFlowFinder.InitGraph(sourceAndDestinationId.Item1, sourceAndDestinationId.Item2);
            return(maxFlowFinder.Find());
        }
Exemple #2
0
        public void FlowTest(Dictionary <string, HashSet <SimpleEdge> > graph, long expected)
        {
            maxFlowFinder       = new MaxFlowFinder();
            maxFlowFinder.Graph = graph;

            Assert.Equal(expected, maxFlowFinder.Find());
        }