Top Description Methods
org.apache.commons.math3.util

public Interface PivotingStrategyInterface

Known Direct Implementers
org.apache.commons.math3.util.RandomPivotingStrategy, org.apache.commons.math3.util.CentralPivotingStrategy, org.apache.commons.math3.util.MedianOf3PivotingStrategy
Imports
org.apache.commons.math3.exception.MathIllegalArgumentException

A strategy to pick a pivoting index of an array for doing partitioning.
Since
3.4
See Also
MedianOf3PivotingStrategy, RandomPivotingStrategy, CentralPivotingStrategy

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the index of the pivot element chosen between the first and the last element of the array slice
pivotIndex
(double[]
data array
work
,
int
index of the first element of the slice
begin
,
int
index after the last element of the slice
end
)

Find pivot index of the array so that partition and Kth element selection can be made

Method Detail

pivotIndexback to summary
public int pivotIndex(double[] work, int begin, int end) throws MathIllegalArgumentException

Find pivot index of the array so that partition and Kth element selection can be made

Parameters
work:double[]

data array

begin:int

index of the first element of the slice

end:int

index after the last element of the slice

Returns:int

the index of the pivot element chosen between the first and the last element of the array slice

Exceptions
MathIllegalArgumentException:
when indices exceeds range