public static Point[] MooreSorter(Point[] array) { Boundary boundary = GetBoundary(array, 5); var sfc = SpaceFillingCurves.Moore(Moves.North, Moves.East); return(SortAlgorithm.MergeSort <Point>(array, (p1, p2) => sfc.ComparePoints(p1, p2, boundary))); }
public static int MooreComparer(Point first, Point second, Boundary mbb) { return(SpaceFillingCurves.Moore(Moves.North, Moves.East).ComparePoints(first, second, mbb)); }