Exemplo n.º 1
0
        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)));
        }
Exemplo n.º 2
0
 public static int PeanoComparer(Point first, Point second, Boundary mbb)
 {
     return(SpaceFillingCurves.Peano(Moves.North, Moves.East).ComparePoints(first, second, mbb));
 }