org.apache.datasketches.pig.tuple

## Class ArrayOfDoublesSketchToEstimates

- java.lang.Object
- - org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>
  - - org.apache.datasketches.pig.tuple.ArrayOfDoublesSketchToEstimates

    public class ArrayOfDoublesSketchToEstimates
    extends org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>

This UDF converts an ArrayOfDoubles sketch to estimates. The result will be a tuple with N + 1 double values, where N is the number of double values kept in the sketch per key. The first estimate is the estimate of the number of unique keys in the original population. Next there are N estimates of the sums of the parameters in the original population (sums of the values in the sketch scaled to the original population).

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.pig.EvalFunc

`org.apache.pig.EvalFunc.SchemaType`

### Field Summary

### Fields inherited from class org.apache.pig.EvalFunc

`log, pigLogger, reporter, returnType`

### Constructor Summary

Constructors
Constructor and Description
`ArrayOfDoublesSketchToEstimates()`

### Method Summary

All Methods Instance Methods Concrete Methods
`org.apache.pig.data.Tuple` `exec(org.apache.pig.data.Tuple input)`

### Methods inherited from class org.apache.pig.EvalFunc

`allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, outputSchema, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn`

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

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

### Constructor Detail

#### ArrayOfDoublesSketchToEstimates

    public ArrayOfDoublesSketchToEstimates()

### Method Detail

#### exec

    public org.apache.pig.data.Tuple exec(org.apache.pig.data.Tuple input)
                                   throws IOException

Specified by:
  `exec` in class `org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>`
Throws:
  `IOException`