//------------------------------------------------------------------------
        //Implements the service methods calling the
        public void HeapHull()
        {
            int nb = NbPoints - NbPointThrown;

            Point[] rawPoints = new Point[nb];
            System.Array.Copy(SamplePoints, NbPointThrown, rawPoints, 0, nb);

            double elapsedTime = 0;

            // ELapsed time come from c function: "double omp_get_wtime( );" which return a double that represent the amount of seconds.
            int indexHull = NativeConvexHullApi.heaphull2WithElapsedTime(rawPoints, nb, ref elapsedTime);

            TimeSpan = TimeSpanHelper.MoreAccurateTimeSpanFromSeconds(elapsedTime);

            //copy the data to the Hull Array
            NbPointsHull = nb - indexHull;
            HullPoints   = new Point[NbPointsHull];
            System.Array.Copy(rawPoints, indexHull, HullPoints, 0, NbPointsHull);
        }
        //-----------------------------------------------------------------------
        public void ChanHull()
        {
            int nb = NbPoints - NbPointThrown;
            //Point[] rawPoints = new Point[nb];
            //System.Array.Copy(SamplePoints, NbPointThrown, rawPoints, 0, nb);

            double elapsedTime = 0;

            if (SamplePoints == null || SamplePoints.Length == 0)
            {
                NbPointsHull = 0;
                HullPoints   = new Point[0];
                return;
            }

            int indexHull = NativeConvexHullApi.chanhullWithElapsedTime(SamplePoints, nb, ref elapsedTime);

            TimeSpan = TimeSpanHelper.MoreAccurateTimeSpanFromSeconds(elapsedTime);

            //copy the data to the Hull Array
            NbPointsHull = nb - indexHull;
            HullPoints   = new Point[NbPointsHull];
            System.Array.Copy(SamplePoints, indexHull, HullPoints, 0, NbPointsHull);
        }
 //-----------------------------------------------------------------------
 public void GenerateVline()
 {
     NativeConvexHullApi.generate_vline_points(SamplePoints, NbPoints);
 }
 //-----------------------------------------------------------------------
 public void GenerateSquarePoints()
 {
     NativeConvexHullApi.generate_square_points(SamplePoints, NbPoints);
 }
 //-----------------------------------------------------------------------
 public void GenerateCirclPoints()
 {
     NativeConvexHullApi.generate_circle_points(SamplePoints, NbPoints);
 }
 //-----------------------------------------------------------------------
 public void GenerateDiskPoints()
 {
     NativeConvexHullApi.generate_disk_points(SamplePoints, NbPoints);
 }
 //-----------------------------------------------------------------------
 public void ThrowAway()
 {
     NbPointThrown = NativeConvexHullApi.throwaway_heuristic(SamplePoints, NbPoints);
 }