Class QuantilesFloatsAPI.FloatsPartitionBoundaries
- java.lang.Object
-
- org.apache.datasketches.quantilescommon.QuantilesFloatsAPI.FloatsPartitionBoundaries
-
- Enclosing interface:
- QuantilesFloatsAPI
public static class QuantilesFloatsAPI.FloatsPartitionBoundaries extends Object
This encapsulates the essential information needed to construct actual partitions and is returned from the getPartitionBoundaries(int, QuantileSearchCritera) method.
-
-
Field Summary
Fields Modifier and Type Field Description float[]
boundaries
The partition boundaries as quantiles.long
N
The total number of items presented to the sketch.double[]
ranks
The normalized ranks that correspond to the returned boundaries.
-
Constructor Summary
Constructors Constructor Description FloatsPartitionBoundaries()
-
-
-
Field Detail
-
N
public long N
The total number of items presented to the sketch.To compute the weight or density of a specific partition i where i varies from 1 to m partitions:
long N = getN(); double[] ranks = getRanks(); long weight = Math.round((ranks[i] - ranks[i - 1]) * N);
-
ranks
public double[] ranks
The normalized ranks that correspond to the returned boundaries. The returned array is of size (m + 1), where m is the requested number of partitions. Index 0 of the returned array is always 0.0, and index m is always 1.0.
-
boundaries
public float[] boundaries
The partition boundaries as quantiles. The returned array is of size (m + 1), where m is the requested number of partitions. Index 0 of the returned array is alwaysgetMinItem()
, and index m is alwaysgetMaxItem()
.
-
-