public final class QuickSelect extends Object
Modifier and Type  Method and Description 

static double 
select(double[] arr,
int lo,
int hi,
int pivot)
Gets the 0based kth order statistic from the array.

static long 
select(long[] arr,
int lo,
int hi,
int pivot)
Gets the 0based kth order statistic from the array.

static double 
selectExcludingZeros(double[] arr,
int nonZeros,
int pivot)
Gets the 1based kth order statistic from the array excluding any zero values in the
array.

static long 
selectExcludingZeros(long[] arr,
int nonZeros,
int pivot)
Gets the 1based kth order statistic from the array excluding any zero values in the
array.

static double 
selectIncludingZeros(double[] arr,
int pivot)
Gets the 1based kth order statistic from the array including any zero values in the
array.

static long 
selectIncludingZeros(long[] arr,
int pivot)
Gets the 1based kth order statistic from the array including any zero values in the
array.

public static long select(long[] arr, int lo, int hi, int pivot)
arr
 The array to be rearranged.lo
 The lowest 0based index to be considered.hi
 The highest 0based index to be considered.pivot
 The 0based index of the value to pivot on.public static long selectIncludingZeros(long[] arr, int pivot)
arr
 The hash array.pivot
 The 1based index of the value that is chosen as the pivot for the array.
After the operation all values below this 1based index will be less than this value
and all values above this index will be greater. The 0based index of the pivot will be
pivot1.public static long selectExcludingZeros(long[] arr, int nonZeros, int pivot)
arr
 The hash array.nonZeros
 The number of nonzero values in the array.pivot
 The 1based index of the value that is chosen as the pivot for the array.
After the operation all values below this 1based index will be less than this value
and all values above this index will be greater. The 0based index of the pivot will be
pivot+arr.lengthnonZeros1.public static double select(double[] arr, int lo, int hi, int pivot)
arr
 The array to be rearranged.lo
 The lowest 0based index to be considered.hi
 The highest 0based index to be considered.pivot
 The 0based smallest value to pivot on.public static double selectIncludingZeros(double[] arr, int pivot)
arr
 The hash array.pivot
 The 1based index of the value that is chosen as the pivot for the array.
After the operation all values below this 1based index will be less than this value
and all values above this index will be greater. The 0based index of the pivot will be
pivot1.public static double selectExcludingZeros(double[] arr, int nonZeros, int pivot)
arr
 The hash array.nonZeros
 The number of nonzero values in the array.pivot
 The 1based index of the value that is chosen as the pivot for the array.
After the operation all values below this 1based index will be less than this value
and all values above this index will be greater. The 0based index of the pivot will be
pivot+arr.lengthnonZeros1.Copyright © 2015–2020 The Apache Software Foundation. All rights reserved.