Serializable, PivotingStrategyInterfacepublic class RandomPivotingStrategy extends Object implements PivotingStrategyInterface, Serializable
| Constructor | Description |
|---|---|
RandomPivotingStrategy(org.apache.commons.rng.simple.RandomSource randomSource,
long seed) |
Simple constructor.
|
| Modifier and Type | Method | 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(org.apache.commons.rng.simple.RandomSource randomSource,
long seed)
randomSource - RNG to use for selecting pivot.seed - Seed for initializing the RNG.public int pivotIndex(double[] work,
int begin,
int end)
throws MathIllegalArgumentException
pivotIndex in interface PivotingStrategyInterfacework - data arraybegin - index of the first element of the sliceend - index after the last element of the sliceMathIllegalArgumentException - when indices exceeds rangeCopyright © 2003–2017 The Apache Software Foundation. All rights reserved.