public abstract class AnotB extends SetOperation
AnotB aNotB = SetOperationBuilder.buildAnotB();
aNotB.update(SketchA, SketchB); //Called only once.
CompactSketch result = aNotB.getResult();
Calling the update function a second time essentially clears the internal state and updates with the new pair of sketches.
As an alternative, one can use the aNotB method that returns the result immediately.
| Constructor and Description |
|---|
AnotB() |
| Modifier and Type | Method and Description |
|---|---|
CompactSketch |
aNotB(Sketch a,
Sketch b)
Perform A-and-not-B set operation on the two given sketches and return the result as an
ordered CompactSketch on the heap.
|
abstract CompactSketch |
aNotB(Sketch a,
Sketch b,
boolean dstOrdered,
org.apache.datasketches.memory.WritableMemory dstMem)
Perform A-and-not-B set operation on the two given sketches and return the result as a
CompactSketch.
|
Family |
getFamily()
Gets the Family of this SetOperation
|
abstract CompactSketch |
getResult()
Gets the result of this operation as an ordered CompactSketch on the Java heap
|
abstract CompactSketch |
getResult(boolean dstOrdered,
org.apache.datasketches.memory.WritableMemory dstMem)
Gets the result of this set operation as a CompactSketch of the chosen form
|
abstract void |
update(Sketch a,
Sketch b)
Perform A-and-not-B set operation on the two given sketches.
|
builder, getMaxIntersectionBytes, getMaxUnionBytes, heapify, heapify, isSameResource, wrap, wrap, wrap, wrappublic Family getFamily()
SetOperationgetFamily in class SetOperationpublic abstract CompactSketch getResult()
public abstract CompactSketch getResult(boolean dstOrdered, org.apache.datasketches.memory.WritableMemory dstMem)
dstOrdered - See Destination Ordered.dstMem - See Destination Memory.public abstract void update(Sketch a, Sketch b)
a - The incoming sketch for the first argumentb - The incoming sketch for the second argumentpublic CompactSketch aNotB(Sketch a, Sketch b)
a - The incoming sketch for the first argumentb - The incoming sketch for the second argumentpublic abstract CompactSketch aNotB(Sketch a, Sketch b, boolean dstOrdered, org.apache.datasketches.memory.WritableMemory dstMem)
a - The incoming sketch for the first argumentb - The incoming sketch for the second argumentdstOrdered - See Destination Ordered.dstMem - See Destination Memory.Copyright © 2015–2020 The Apache Software Foundation. All rights reserved.