org.apache.datasketches.pig.quantiles

## Class GetPmfFromStringsSketch

- java.lang.Object
- - org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>
  - - org.apache.datasketches.pig.quantiles.GetPmfFromStringsSketch

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

This UDF is to get an approximation to the Probability Mass Function (PMF) of the input stream given a sketch and a set of split points - an array of m unique, monotonically increasing values that divide the domain into m+1 consecutive disjoint intervals. The function returns an array of m+1 doubles each of which is an approximation to the fraction of the input stream values that fell into one of those intervals. Intervals are inclusive of the left split point and exclusive of the right split point.

### 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
`GetPmfFromStringsSketch()`

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

#### GetPmfFromStringsSketch

    public GetPmfFromStringsSketch()

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