public class RandomPivotingStrategy extends Object implements PivotingStrategyInterface, Serializable
Constructor and Description |
---|
RandomPivotingStrategy(RandomGenerator random)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
pivotIndex(double[] work,
int begin,
int end)
Find pivot index of the array so that partition and Kth
element selection can be made
|
public RandomPivotingStrategy(RandomGenerator random)
random
- random generator to use for selecting pivotpublic int pivotIndex(double[] work, int begin, int end) throws MathIllegalArgumentException
pivotIndex
in interface PivotingStrategyInterface
work
- data arraybegin
- index of the first element of the sliceend
- index after the last element of the sliceMathIllegalArgumentException
- when indices exceeds rangeCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.