Interface Partitioner

All Known Implementing Classes:
ParallelPartitioner, SequentialPartitioner

public interface Partitioner
Author:
Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
  • Method Summary

    Modifier and Type Method Description
    PivotLocation partitionRange​(int[] data, int min, int maxExclusive)
    Partitions the data in range between min (inclusive) and maxExclusive in place such that all values at indices lower than the pivot index are lower than all of the values at indices higher than the pivot index.
  • Method Details

    • partitionRange

      PivotLocation partitionRange​(int[] data, int min, int maxExclusive) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
      Partitions the data in range between min (inclusive) and maxExclusive in place such that all values at indices lower than the pivot index are lower than all of the values at indices higher than the pivot index.
      Parameters:
      data - the array to partition
      min - the minimum value (inclusive) of the range to partition
      maxExclusive - the maximum value (exclusive) of the range to partition
      Returns:
      the location of the pivot
      Throws:
      java.lang.InterruptedException - if the computation was cancelled
      java.util.concurrent.ExecutionException - if the computation threw an exception