Class 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 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 class ArrayOfDoublesAnotB
        Parameters:
        skA - The incoming sketch for the first argument
        skB - The incoming sketch for the second argument
      • 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 class ArrayOfDoublesAnotB
        Parameters:
        dstMem - memory for the result (can be null)
        Returns:
        compact sketch representing the result of the operation (off-heap if memory is provided)