org.apache.datasketches.pig.theta

## Class Estimate

- java.lang.Object
- - org.apache.pig.EvalFunc<Double>
  - - org.apache.datasketches.pig.theta.Estimate

    public class Estimate
    extends org.apache.pig.EvalFunc<Double>

Returns the unique count estimate of a sketch as a Double.

### 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
`Estimate()` Constructs with the DEFAULT_UPDATE_SEED used when deserializing the sketch.
`Estimate(long seed)` Constructs with the given seed.
`Estimate(String seedStr)` Constructs with the given seed.

### Method Summary

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

### 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

#### Estimate

    public Estimate()

Constructs with the DEFAULT_UPDATE_SEED used when deserializing the sketch.

#### Estimate

    public Estimate(String seedStr)

Constructs with the given seed.

Parameters:
  `seedStr` - the string seed used when deserializing the sketch.

#### Estimate

    public Estimate(long seed)

Constructs with the given seed.

Parameters:
  `seed` - used when deserializing the sketch.

### Method Detail

#### exec

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

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