Package org.apache.commons.math3.util
Interface PivotingStrategyInterface
- All Known Implementing Classes:
CentralPivotingStrategy
,MedianOf3PivotingStrategy
,RandomPivotingStrategy
public interface PivotingStrategyInterface
A strategy to pick a pivoting index of an array for doing partitioning.
- Since:
- 3.4
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionint
pivotIndex
(double[] work, int begin, int end) Find pivot index of the array so that partition and Kth element selection can be made
-
Method Details
-
pivotIndex
Find pivot index of the array so that partition and Kth element selection can be made- Parameters:
work
- data arraybegin
- index of the first element of the sliceend
- index after the last element of the slice- Returns:
- the index of the pivot element chosen between the first and the last element of the array slice
- Throws:
MathIllegalArgumentException
- when indices exceeds range
-