public TestRunner() { Factory = new GraphFactory <int, double>(); Parser = new DefaultGraphTextLineParser(); Files = new HashSet <string>(); Graphs = new Dictionary <string, IGraph <int> >(); }
public MaxFlowTests() { Factory = new GraphFactory <int, double>(); Parser = new DefaultGraphTextLineParser(); CombineFlowValues = (double currentFlow, double augmentingFlow) => currentFlow + augmentingFlow; SubstractFlowValues = (double currentFlow, double augmentingFlow) => currentFlow - augmentingFlow; }
public void TestSmallGraphs() { DefaultGraphTextLineParser parser = new DefaultGraphTextLineParser(); Graph <int, double> graph1 = Factory.CreateGraphFromFile("./graphs/complete/K_12.txt", parser); Graph <int, double> graph2 = Factory.CreateGraphFromFile("./graphs/complete/K_12e.txt", parser); TestTspAlgorithms(graph1, 12, 12, 45.19); TestTspAlgorithms(graph2, 12, 12, 36.13); }
public void TestTinyGraphs() { DefaultGraphTextLineParser parser = new DefaultGraphTextLineParser(); Graph <int, double> graph1 = Factory.CreateGraphFromFile("./graphs/complete/K_10.txt", parser); Graph <int, double> graph2 = Factory.CreateGraphFromFile("./graphs/complete/K_10e.txt", parser); TestTspAlgorithms(graph1, 10, 10, 38.41); TestTspAlgorithms(graph2, 10, 10, 27.26); }
public TestRunner() { Factory = new GraphFactory <int, double>(); Parser = new DefaultGraphTextLineParser(); Files = new HashSet <string>(); Graphs = new Dictionary <string, IWeightedGraph <int, double> >(); // Set which algorithms should be tested AlgorithmsToTest = new HashSet <ALGORITHM>() { ALGORITHM.KRUSKAL, ALGORITHM.PRIM }; // Configure Serilog Log.Logger = new LoggerConfiguration() .MinimumLevel.Debug() .WriteTo.Console() .CreateLogger(); // Set Serilog logger to Microsoft's ILogger Logger = new LoggerFactory().AddSerilog().CreateLogger <TestRunner>(); }
public TestRunner() { Factory = new GraphFactory <int, double>(); Parser = new DefaultGraphTextLineParser(); Files = new HashSet <string>(); Graphs = new Dictionary <string, IWeightedGraph <int, double> >(); // Set which algorithms should be tested AlgorithmsToTest = new HashSet <TspAlgorithm>() { TspAlgorithm.NearestNeighbor, TspAlgorithm.DoubleTree, TspAlgorithm.BruteForce }; // Configure Serilog Log.Logger = new LoggerConfiguration() .MinimumLevel.Debug() .WriteTo.Console() .CreateLogger(); // Set Serilog logger to Microsoft's ILogger Logger = new LoggerFactory().AddSerilog().CreateLogger <TestRunner>(); }
public ConnectedComponentTests() { Factory = new GraphFactory <int, double>(); Parser = new DefaultGraphTextLineParser(); }
public MaxMatchingsTests() { Factory = new GraphFactory <int, double>(); Parser = new DefaultGraphTextLineParser(); }
public ShortestPathTests() { Factory = new GraphFactory <int, double>(); Parser = new DefaultGraphTextLineParser(); }
public MinimumSpanningTreeTests() { Factory = new GraphFactory <int, double>(); Parser = new DefaultGraphTextLineParser(); }