public enum SortInPlace extends Enum<SortInPlace>
x = [3, 1, 2]y = [1, 2, 3]z = [0, 5, 7]Sort.ASCENDING.apply(x, y, z) will update those arrays:
x = [1, 2, 3]y = [2, 3, 1]z = [5, 7, 0]| Enum Constant and Description |
|---|
ASCENDING
Sort in ascending order.
|
DESCENDING
Sort in descending order.
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(double[] x,
double[]... yList)
Sorts in place.
|
static SortInPlace |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SortInPlace[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SortInPlace ASCENDING
public static final SortInPlace DESCENDING
public static SortInPlace[] values()
for (SortInPlace c : SortInPlace.values()) System.out.println(c);
public static SortInPlace 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 void apply(double[] x, double[]... yList)
x - Array to be sorted and used as a pattern for permutation of
the other arrays.yList - Set of arrays whose permutations of entries will follow
those performed on x.IllegalArgumentException - if not all arrays have the same size.Copyright © 2017–2022 The Apache Software Foundation. All rights reserved.