Package tnx.lab.executor
Class XParallelQuicksorter<T>
java.lang.Object
tnx.lab.executor.XParallelQuicksorter<T>
- All Implemented Interfaces:
Sorter<T>
- Author:
- __STUDENT_NAME__, Finn Voichick, Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
-
Constructor Summary
ConstructorsConstructorDescriptionXParallelQuicksorter(ExecutorService executor, Partitioner<T> partitioner, IntPredicate isParallelDesired)XParallelQuicksorter(ExecutorService executor, Partitioner<T> partitioner, IntPredicate isParallelDesired, Sorter<T> sequentialSorter) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidsortRange(T[] data, Comparator<T> comparator, int min, int maxExclusive)
-
Constructor Details
-
XParallelQuicksorter
public XParallelQuicksorter(ExecutorService executor, Partitioner<T> partitioner, IntPredicate isParallelDesired, Sorter<T> sequentialSorter) -
XParallelQuicksorter
public XParallelQuicksorter(ExecutorService executor, Partitioner<T> partitioner, IntPredicate isParallelDesired)
-
-
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
-