Package sort.merge.studio
Class ParallelMergeSorter<T>
java.lang.Object
sort.merge.studio.ParallelMergeSorter<T>
- All Implemented Interfaces:
Sorter<T>
- Author:
- __STUDENT_NAME__, Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
-
Constructor Summary
ConstructorsConstructorDescriptionParallelMergeSorter(Combiner<T> combiner, IntPredicate isParallelDesired)ParallelMergeSorter(Combiner<T> combiner, IntPredicate isParallelDesired, Sorter<T> sequentialSorter) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidsortRange(T[] data, Comparator<T> comparator, int min, int maxExclusive)
-
Constructor Details
-
ParallelMergeSorter
public ParallelMergeSorter(Combiner<T> combiner, IntPredicate isParallelDesired, Sorter<T> sequentialSorter) -
ParallelMergeSorter
-
-
Method Details
-
isParallel
public boolean isParallel()- Specified by:
isParallelin interfaceSorter<T>
-
sortRange
public void sortRange(T[] data, Comparator<T> comparator, int min, int maxExclusive) throws InterruptedException, ExecutionException- Specified by:
sortRangein interfaceSorter<T>- Throws:
InterruptedExceptionExecutionException
-