private string CalculateShortestCycle(char sourceNode) { string result = "NO CYCLE"; List <AbstractGraphPath <char> > shortestCycles = CycleCalculator.FindShortestCycle(_graph, sourceNode); if (shortestCycles.Any()) { result = shortestCycles.First().PathWeight.ToString(); } return(result); }
private string CalculateCyclesWithMaxWeight(char node, int maxWeight) { int count = CycleCalculator.CountAllCycles(_graph, node, maxWeight); return(count.ToString()); }
private string CalculateCycleCount(char node, int maxStops) { string result = CycleCalculator.FindAllSimpleCycles(_graph, node, maxStops).Count.ToString(); return(result); }