cleanup
This commit is contained in:
@@ -25,13 +25,12 @@ namespace TMI_practicum
|
||||
|
||||
var (algorithm, _, circles) = ParseFile(args[0]);
|
||||
|
||||
|
||||
|
||||
|
||||
Stopwatch stopwatch = new Stopwatch();
|
||||
IEnumerable<Intersection> solved;
|
||||
|
||||
stopwatch.Start();
|
||||
|
||||
|
||||
switch (algorithm)
|
||||
{
|
||||
case 1:
|
||||
@@ -56,10 +55,11 @@ namespace TMI_practicum
|
||||
{
|
||||
var circles = new List<Circle>();
|
||||
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<Intersection> solved = SweepLineEffAlgorithm.Solve(circles);
|
||||
@@ -98,7 +97,6 @@ namespace TMI_practicum
|
||||
|
||||
private static (byte Algorithm, int NbCircles, IList<Circle> 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user