public static List<C2DPoint> GenerateRandomNonConvex(int n, int maxSize)
 {
     Random r = new Random();
     var points = new List<C2DPoint>(n);
     for (int i = 0; i < n; i++)
     {
         points.Add(new C2DPoint(r.Next(maxSize), r.Next(maxSize)));
     }
     GuibasAndStolfi GaS = new GuibasAndStolfi(points);
     return points;
 }
 public void EvaluateGui(List<C2DPoint> points)
 {
     var guiObject = new GuibasAndStolfi();
     guiObject.SetPoints(points);
     Stopwatch stopWatch = new Stopwatch();
     stopWatch.Start();
     guiObject.Run();
     stopWatch.Stop();
     gui += stopWatch.ElapsedMilliseconds;
 }
Example #3
0
 private void testGuibasAndStolfi(int n)
 {
     Random r = new Random();
     points = new List<C2DPoint>(n);
     for (int i = 0; i < n; i++)
     {
         points.Add(new C2DPoint(r.Next(maxSize), r.Next(maxSize)));
     }
     GuibasAndStolfi GaS =  new GuibasAndStolfi(points);
     result = GaS.Run();
 }