Serializable
, Comparable<PivotingStrategy>
public enum PivotingStrategy extends Enum<PivotingStrategy>
Enum Constant | Description |
---|---|
CENTRAL |
A mid point strategy based on the average of begin and end indices.
|
MEDIAN_OF_3 |
Classic median of 3 strategy given begin and end indices.
|
Modifier and Type | Method | Description |
---|---|---|
abstract int |
pivotIndex(double[] work,
int begin,
int end) |
Find pivot index of the array so that partition and Kth
element selection can be made
|
static PivotingStrategy |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static PivotingStrategy[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PivotingStrategy CENTRAL
public static final PivotingStrategy MEDIAN_OF_3
public static PivotingStrategy[] values()
for (PivotingStrategy c : PivotingStrategy.values()) System.out.println(c);
public static PivotingStrategy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract int pivotIndex(double[] work, int begin, int end) throws MathIllegalArgumentException
work
- data arraybegin
- index of the first element of the sliceend
- index after the last element of the sliceMathIllegalArgumentException
- when indices exceeds rangeCopyright © 2016–2018 Hipparchus.org. All rights reserved.