Package org.apache.datasketches.hive.cpc

## Class GetEstimateAndErrorBoundsUDF

- java.lang.Object
- - org.apache.hadoop.hive.ql.exec.UDF
  - - org.apache.datasketches.hive.cpc.GetEstimateAndErrorBoundsUDF

    public class GetEstimateAndErrorBoundsUDF
    extends org.apache.hadoop.hive.ql.exec.UDF

### Constructor Summary

Constructors
`GetEstimateAndErrorBoundsUDF()`

### Method Summary

All Methods Instance Methods Concrete Methods
`List<Double>` `evaluate​(org.apache.hadoop.io.BytesWritable serializedSketch)` Get an estimate from a given CpcSketch using the default seed and kappa
`List<Double>` `evaluate​(org.apache.hadoop.io.BytesWritable serializedSketch, int kappa)` Get an estimate and bounds from a given CpcSketch with default seed
`List<Double>` `evaluate​(org.apache.hadoop.io.BytesWritable serializedSketch, int kappa, long seed)` Get an estimate and bounds from a given CpcSketch with explicit seed

### Methods inherited from class org.apache.hadoop.hive.ql.exec.UDF

`getRequiredFiles, getRequiredJars, getResolver, setResolver`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### GetEstimateAndErrorBoundsUDF

    public GetEstimateAndErrorBoundsUDF()

### Method Detail

#### evaluate

    public List<Double> evaluate​(org.apache.hadoop.io.BytesWritable serializedSketch)

Get an estimate from a given CpcSketch using the default seed and kappa

Parameters:
  `serializedSketch` - CpcSketch in a serialized binary form
Returns:
  estimate of unique count

#### evaluate

    public List<Double> evaluate​(org.apache.hadoop.io.BytesWritable serializedSketch,
                                 int kappa)

Get an estimate and bounds from a given CpcSketch with default seed

Parameters:
  `serializedSketch` - CpcSketch in a serialized binary form
  `kappa` - given number of standard deviations from the mean: 1, 2 or 3
Returns:
  estimate, lower and upper bound

#### evaluate

    public List<Double> evaluate​(org.apache.hadoop.io.BytesWritable serializedSketch,
                                 int kappa,
                                 long seed)

Get an estimate and bounds from a given CpcSketch with explicit seed

Parameters:
  `serializedSketch` - CpcSketch in a serialized binary form
  `kappa` - given number of standard deviations from the mean: 1, 2 or 3
  `seed` - update seed
Returns:
  estimate, lower and upper bound