public static Point[] GraySorter(Point[] array) { Boundary boundary = GetBoundary(array, 5); var sfc = SpaceFillingCurves.Gray(Moves.North, Moves.East, Moves.South); return(IRI.Msh.DataStructure.SortAlgorithm.MergeSort <Point>(array, (p1, p2) => sfc.ComparePoints(p1, p2, boundary))); //SortAlgorithm.QuickSort<Point>(array, (p1, p2) => sfc.ComparePoints(p1, p2, boundary)); //return array; }
public static int GrayComparer(Point first, Point second, Boundary mbb) { return(SpaceFillingCurves.Gray(Moves.North, Moves.East, Moves.South).ComparePoints(first, second, mbb)); }