Class ArrayOfDoublesAnotBImpl
java.lang.Object
org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesAnotB
org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesAnotBImpl
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
Modifier and TypeMethodDescriptionGets the result of this operation in the form of a ArrayOfDoublesCompactSketchgetResult
(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 Details
-
update
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
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
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)
-