diff --git a/TMI-practicum/Program.cs b/TMI-practicum/Program.cs index 9a59fe5..908942e 100644 --- a/TMI-practicum/Program.cs +++ b/TMI-practicum/Program.cs @@ -25,13 +25,12 @@ namespace TMI_practicum var (algorithm, _, circles) = ParseFile(args[0]); - - + Stopwatch stopwatch = new Stopwatch(); IEnumerable solved; stopwatch.Start(); - + switch (algorithm) { case 1: @@ -56,10 +55,11 @@ namespace TMI_practicum { var circles = new List(); Random rnd = new Random(); - + 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.01, 15))); + circles.Add(new Circle(Math.Round(rnd.NextDouble() * 1.0, 15), Math.Round(rnd.NextDouble() * 1.0, 15), + Math.Round(rnd.NextDouble() * 0.01, 15))); } return circles; @@ -67,9 +67,8 @@ namespace TMI_practicum private static void GetChartData() { - var stopwatch = new Stopwatch(); - + //warmup var circles = CreateRandomCircles(20); IEnumerable solved = SweepLineEffAlgorithm.Solve(circles); @@ -98,7 +97,6 @@ namespace TMI_practicum private static (byte Algorithm, int NbCircles, IList Circles) ParseFile(string path) { - byte algorithm = 0; int nbCircles = 0; Circle[] circles = null; @@ -125,7 +123,7 @@ namespace TMI_practicum Environment.Exit(1); } } - + return (algorithm, nbCircles, circles); } @@ -149,4 +147,4 @@ namespace TMI_practicum } } } -} +} \ No newline at end of file diff --git a/TMI-practicum/SweepLineEffAlgorithm.cs b/TMI-practicum/SweepLineEffAlgorithm.cs index 5031f53..bd43a5f 100644 --- a/TMI-practicum/SweepLineEffAlgorithm.cs +++ b/TMI-practicum/SweepLineEffAlgorithm.cs @@ -131,7 +131,7 @@ namespace TMI_practicum { private readonly double _x; private readonly double? _y; - public double Y => _y ?? double.MinValue; + private double Y => _y ?? double.MinValue; private readonly SegmentType _type; private readonly int _identifier;