public static class AdaptiveCounting.Builder extends Object implements IBuilder<ICardinality>, Serializable
Modifier and Type | Field and Description |
---|---|
protected int |
k |
Modifier and Type | Method and Description |
---|---|
AdaptiveCounting |
build() |
static IBuilder<ICardinality> |
obyCount(long maxCardinality)
For cardinalities less than 4.25M, obyCount provides a LinearCounting Builder
(see LinearCounting.Builder.onePercentError() ) using only the
space required to provide estimates within 1% of the actual cardinality,
up to ~65k.
|
int |
sizeof() |
public AdaptiveCounting build()
build
in interface IBuilder<ICardinality>
public int sizeof()
sizeof
in interface IBuilder<ICardinality>
public static IBuilder<ICardinality> obyCount(long maxCardinality)
For cardinalities less than 4.25M, obyCount provides a LinearCounting Builder (see LinearCounting.Builder.onePercentError() ) using only the space required to provide estimates within 1% of the actual cardinality, up to ~65k.
For cardinalities greater than 4.25M, an AdaptiveCounting builder is returned that allocates ~65KB and provides estimates with a Gaussian error distribution with an average error of 0.5% and a standard deviation of 0.5%
maxCardinality
- IllegalArgumentException
- if maxCardinality is not a positive integerLinearCounting.Builder.onePercentError(int)
Copyright © 2019. All rights reserved.