diff --git a/TMI-practicum/Program.cs b/TMI-practicum/Program.cs index aea1ce6..3cbea4e 100644 --- a/TMI-practicum/Program.cs +++ b/TMI-practicum/Program.cs @@ -10,8 +10,8 @@ namespace TMI_practicum { public static void Main(string[] args) { - CheckAlgo(); - //GetChartData(); + //CheckAlgo(); + GetChartData(); if (args.Length < 1) { Console.WriteLine("Please enter a file."); @@ -62,8 +62,8 @@ namespace TMI_practicum Console.WriteLine("start check {0}", i++); var circles = CreateRandomCircles(5); - var correctSol = SimpleAlgorithm.Solve(circles); - var solved = SweepLineAlgorithm.Solve(circles); + var correctSol = SweepLineAlgorithm.Solve(circles); + var solved = SweepLineEffAlgorithm.Solve(circles); foreach (var intersection in correctSol) { @@ -122,7 +122,7 @@ namespace TMI_practicum for (int i = 0; i < amount; i++) { circles.Add(new Circle(Math.Round(rnd.NextDouble() * 1.0, 15), Math.Round(rnd.NextDouble() * 1.0, 15), - Math.Round(rnd.NextDouble() * 0.90 + 0.05, 15))); + Math.Round(rnd.NextDouble() * (1.0/amount), 15))); } return circles; diff --git a/TMI-practicum/SweepLineEffAlgorithm.cs b/TMI-practicum/SweepLineEffAlgorithm.cs index 39e7508..c44465a 100644 --- a/TMI-practicum/SweepLineEffAlgorithm.cs +++ b/TMI-practicum/SweepLineEffAlgorithm.cs @@ -76,7 +76,6 @@ namespace TMI_practicum } catch (DuplicateNotAllowedException) { - Console.WriteLine("error"); } if (s1.Key.Type == SegmentKey.SegmentType.Upper)