Class ArrayOfDoublesAnotBImpl
- java.lang.Object
-
- org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesAnotB
-
- org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesAnotBImpl
-
public class ArrayOfDoublesAnotBImpl extends ArrayOfDoublesAnotB
Computes a set difference, A-AND-NOT-B, of two ArrayOfDoublesSketches.This class includes a stateless operation as follows:
CompactSketch csk = anotb.aNotB(ArrayOfDoublesSketch skA, ArrayOfDoublesSketch skB);
- Author:
- Lee Rhodes
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayOfDoublesCompactSketch
getResult()
Gets the result of this operation in the form of a ArrayOfDoublesCompactSketchArrayOfDoublesCompactSketch
getResult(org.apache.datasketches.memory.WritableMemory dstMem)
Gets the result of this operation in the form of a ArrayOfDoublesCompactSketchvoid
update(ArrayOfDoublesSketch skA, ArrayOfDoublesSketch skB)
Perform A-and-not-B set operation on the two given sketches.
-
-
-
Method Detail
-
update
public void update(ArrayOfDoublesSketch skA, ArrayOfDoublesSketch skB)
Description copied from class:ArrayOfDoublesAnotB
Perform A-and-not-B set operation on the two given sketches. A null sketch is interpreted as an empty sketch. This is not an accumulating update. Calling update() more than once without calling getResult() will discard the result of previous update(). Both input sketches must have the same numValues.- Specified by:
update
in classArrayOfDoublesAnotB
- Parameters:
skA
- The incoming sketch for the first argumentskB
- The incoming sketch for the second argument
-
getResult
public ArrayOfDoublesCompactSketch getResult()
Description copied from class:ArrayOfDoublesAnotB
Gets the result of this operation in the form of a ArrayOfDoublesCompactSketch- Specified by:
getResult
in classArrayOfDoublesAnotB
- Returns:
- compact sketch representing the result of the operation
-
getResult
public ArrayOfDoublesCompactSketch getResult(org.apache.datasketches.memory.WritableMemory dstMem)
Description copied from class:ArrayOfDoublesAnotB
Gets the result of this operation in the form of a ArrayOfDoublesCompactSketch- Specified by:
getResult
in classArrayOfDoublesAnotB
- Parameters:
dstMem
- memory for the result (can be null)- Returns:
- compact sketch representing the result of the operation (off-heap if memory is provided)
-
-