public class QuantilesHelper extends Object
| Constructor and Description |
|---|
QuantilesHelper() |
| Modifier and Type | Method and Description |
|---|---|
static int |
chunkContainingPos(long[] wtArr,
long pos)
This is written in terms of a plain array to facilitate testing.
|
static long |
convertToPrecedingCummulative(long[] array)
Convert the weights into totals of the weights preceding each item.
|
static long |
posOfPhi(double rank,
long n)
Deprecated.
use
posOfRank(double, long) instead. Version 3.2.0. |
static long |
posOfRank(double rank,
long n)
Returns the linear zero-based index (position) of a value in the hypothetical sorted stream of
values of size n.
|
public static long convertToPrecedingCummulative(long[] array)
array - of weights where first element is zeropublic static long posOfRank(double rank,
long n)
rank - the fractional position where: 0 ≤ φ ≤ 1.0.n - the size of the stream@Deprecated public static long posOfPhi(double rank, long n)
posOfRank(double, long) instead. Version 3.2.0.rank - the fractional position where: 0 ≤ φ ≤ 1.0.n - the size of the streampublic static int chunkContainingPos(long[] wtArr,
long pos)
wtArr - the cumulative weights array consisting of chunkspos - the positionCopyright © 2015–2020 The Apache Software Foundation. All rights reserved.