Class MergeSort

    • Constructor Detail

      • MergeSort

        public MergeSort()
    • Method Detail

      • sort

        public boolean sort​(Cell[][] tab,
                            int column,
                            int maxIter,
                            SortAlgorithm.Order order)
        A wrapper for mergeSort(Cell[][], int, int, int, int, Order) compatible with the SortAlgorithm interface.
        Specified by:
        sort in interface SortAlgorithm
        Parameters:
        tab - a 2-D array of type Cell to be sorted.
        column - the index of the column which will be the sorting criteria.
        maxIter - maximum recursion depth. Value of -1 means unlimited iterations, <-1 means none.
        order - an enum Order value determining the sorting direction.
        Returns:
        a boolean value of whether sorting could be completed in the given number of iterations.