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