public final class QuantilesUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
THROWS_EMPTY |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkDoublesSplitPointsOrder(double[] values)
Checks the sequential validity of the given array of double values.
|
static void |
checkFloatsSplitPointsOrder(float[] values)
Checks the sequential validity of the given array of float values.
|
static void |
checkNormalizedRankBounds(double nRank)
Checks that the given normalized rank: 0 ≤ nRank ≤ 1.0.
|
static double[] |
equallyWeightedRanks(int num)
Returns a double array of ranks that defines equally weighted regions between 0.0, inclusive and 1.0, inclusive.
|
static double[] |
evenlyLogSpaced(double value1,
double value2,
int num)
Returns a double array of values between min and max inclusive where the log of the
returned values are evenly spaced.
|
static double[] |
evenlySpacedDoubles(double value1,
double value2,
int num)
Returns a double array of evenly spaced values between value1, inclusive, and value2 inclusive.
|
static float[] |
evenlySpacedFloats(float value1,
float value2,
int num)
Returns a float array of evenly spaced values between value1, inclusive, and value2 inclusive.
|
public static final String THROWS_EMPTY
public static final void checkNormalizedRankBounds(double nRank)
nRank - the given normalized rank.public static final void checkDoublesSplitPointsOrder(double[] values)
values - the given array of double valuespublic static final void checkFloatsSplitPointsOrder(float[] values)
values - the given array of double valuespublic static double[] equallyWeightedRanks(int num)
num - the total number of equally weighted regions between 0.0 and 1.0 defined by the ranks in the returned
array. num must be 1 or greater.IllegalArgumentException - if num is less than 1.public static float[] evenlySpacedFloats(float value1,
float value2,
int num)
value1 - will be in index 0 of the returned arrayvalue2 - will be in the highest index of the returned arraynum - the total number of values including value1 and value2. Must be 2 or greater.public static double[] evenlySpacedDoubles(double value1,
double value2,
int num)
value1 - will be in index 0 of the returned arrayvalue2 - will be in the highest index of the returned arraynum - the total number of values including value1 and value2. Must be 2 or greater.public static double[] evenlyLogSpaced(double value1,
double value2,
int num)
value1 - will be in index 0 of the returned array, and must be greater than zero.value2 - will be in the highest index of the returned array, and must be greater than zero.num - the total number of values including value1 and value2. Must be 2 or greaterCopyright © 2015–2022 The Apache Software Foundation. All rights reserved.