public static Point[] ZOrderingSorter(Point[] array) { Boundary boundary = GetBoundary(array, 5); var sfc = SpaceFillingCurves.ZOrdering(); return(IRI.Msh.DataStructure.SortAlgorithm.MergeSort <Point>(array, (p1, p2) => sfc.ComparePoints(p1, p2, boundary))); }
public static Point[] HosseinSorter(Point[] array) { Boundary boundary = GetBoundary(array, 5); var sfc = SpaceFillingCurves.Hossein(Moves.North, Moves.East); return(SortAlgorithm.MergeSort <Point>(array, (p1, p2) => sfc.ComparePoints(p1, p2, boundary))); }
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 Point[] NOrderingSorter(Point[] array) { Boundary boundary = GetBoundary(array, 5); var sfc = SpaceFillingCurves.NOrdering(Moves.North, Moves.SouthEast); //return SortAlgorithm.Heapsort<Point>(array, (p1, p2) => NOrderingComparer(p1, p2, boundary)); //return SortAlgorithm.MergeSort<Point>(array, (p1, p2) => NOrderingComparer(p1, p2, boundary)); //IRI.Msh.DataStructure.SortAlgorithm.QuickSort<Point>(array, (p1, p2) => HilbertComparer(p1, p2, boundary)); //return array; return(SortAlgorithm.MergeSort <Point>(array, (p1, p2) => sfc.ComparePoints(p1, p2, boundary))); }
public static Point[] HilbertSorter(Point[] array) { Boundary boundary = GetBoundary(array, 0.0005); var sfc = SpaceFillingCurves.Hilbert(Moves.North, Moves.East); //IRI.Msh.DataStructure.SortAlgorithm.QuickSort<Point>(array, (p1, p2) => sfc.ComparePoints(p1, p2, boundary)); //return array; //Array.Sort(array, new Comparison<Point>((p1, p2) => sfc.ComparePoints(p1, p2, boundary))); //return array; //return IRI.Msh.DataStructure.SortAlgorithm.Heapsort<Point>(array, (p1, p2) => sfc.ComparePoints(p1, p2, boundary)); //return IRI.Msh.DataStructure.SortAlgorithm.MergeSort<Point>(array, (p1, p2) => sfc.ComparePoints(p1, p2, boundary)); IRI.Msh.DataStructure.SortAlgorithm.BubbleSort <Point>(array, (p1, p2) => sfc.ComparePoints(p1, p2, boundary)); return(array); }
public static int Peano03Comparer(Point first, Point second, Boundary mbb) { return(SpaceFillingCurves.Peano03(Moves.North, Moves.East).ComparePoints(first, second, mbb)); }
public static int UOrderOrLebesgueSquareComparer(Point first, Point second, Boundary mbb) { return(SpaceFillingCurves.UOrderOrLebesgueSquare(Moves.North, Moves.East).ComparePoints(first, second, mbb)); }
public static int DiagonalLebesgueComparer(Point first, Point second, Boundary mbb) { return(SpaceFillingCurves.LebesgueDiagonal(Moves.NorthEast, Moves.West).ComparePoints(first, second, mbb)); }
public static int ZOrderingComparer(Point first, Point second, Boundary mbb) { return(SpaceFillingCurves.NOrdering(Moves.East, Moves.SouthWest).ComparePoints(first, second, mbb)); }
public static int GrayComparer(Point first, Point second, Boundary mbb) { return(SpaceFillingCurves.Gray(Moves.North, Moves.East, Moves.South).ComparePoints(first, second, mbb)); }