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 phi,
long n)
Returns the 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 posOfPhi(double phi,
long n)
phi - the fractional position where: 0 ≤ φ ≤ 1.0.n - the size of the streampublic static int chunkContainingPos(long[] wtArr,
long pos)
wtArr - the cumlative weights array consisting of chunkspos - the positionCopyright © 2015–2020 The Apache Software Foundation. All rights reserved.