# Uses of Class
org.apache.datasketches.theta.CompactSketch

Packages that use CompactSketch
Package
Description
org.apache.datasketches.theta
The theta package contains the basic sketch classes that are members of the Theta Sketch Framework.

## Uses of CompactSketch in org.apache.datasketches.theta

Methods in org.apache.datasketches.theta that return CompactSketch
Modifier and Type
Method
Description
`CompactSketch`
AnotB.`aNotB(Sketch skA, Sketch skB)`
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.`aNotB(Sketch skA, Sketch skB, 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.
`abstract CompactSketch`
CompactSketch.`compact(boolean dstOrdered, org.apache.datasketches.memory.WritableMemory dstMem)`
`CompactSketch`
Sketch.`compact()`
Converts this sketch to a ordered CompactSketch.
`abstract CompactSketch`
Sketch.`compact(boolean dstOrdered, org.apache.datasketches.memory.WritableMemory dstMem)`
Convert this sketch to a CompactSketch.
`CompactSketch`
UpdateSketch.`compact(boolean dstOrdered, org.apache.datasketches.memory.WritableMemory dstMem)`
`abstract CompactSketch`
AnotB.`getResult(boolean reset)`
Gets the result of the multistep, stateful operation AnotB that have been executed with calls to `AnotB.setA(Sketch)` and (`AnotB.notB(Sketch)` or `AnotB.notB(org.apache.datasketches.theta.Sketch)`).
`abstract CompactSketch`
AnotB.`getResult(boolean dstOrdered, org.apache.datasketches.memory.WritableMemory dstMem, boolean reset)`
Gets the result of the multistep, stateful operation AnotB that have been executed with calls to `AnotB.setA(Sketch)` and (`AnotB.notB(Sketch)` or `AnotB.notB(org.apache.datasketches.theta.Sketch)`).
`CompactSketch`
Intersection.`getResult()`
Gets the result of this operation as an ordered CompactSketch on the Java heap.
`abstract CompactSketch`
Intersection.`getResult(boolean dstOrdered, org.apache.datasketches.memory.WritableMemory dstMem)`
Gets the result of this operation as a CompactSketch in the given dstMem.
`abstract CompactSketch`
Union.`getResult()`
Gets the result of this operation as an ordered CompactSketch on the Java heap.
`abstract CompactSketch`
Union.`getResult(boolean dstOrdered, org.apache.datasketches.memory.WritableMemory dstMem)`
Gets the result of this operation as a CompactSketch of the chosen form.
`static CompactSketch`
CompactSketch.`heapify(org.apache.datasketches.memory.Memory srcMem)`
Heapify takes a CompactSketch image in Memory and instantiates an on-heap CompactSketch.
`static CompactSketch`
CompactSketch.`heapify(org.apache.datasketches.memory.Memory srcMem, long expectedSeed)`
Heapify takes a CompactSketch image in Memory and instantiates an on-heap CompactSketch.
`static CompactSketch`
Sketches.`heapifyCompactSketch(org.apache.datasketches.memory.Memory srcMem)`
Ref: `CompactSketch.heapify(Memory)`
`static CompactSketch`
Sketches.`heapifyCompactSketch(org.apache.datasketches.memory.Memory srcMem, long expectedSeed)`
Ref: `CompactSketch.heapify(Memory, long)`
`CompactSketch`
Intersection.`intersect(Sketch a, Sketch b)`
Perform intersect set operation on the two given sketch arguments and return the result as an ordered CompactSketch on the heap.
`abstract CompactSketch`
Intersection.`intersect(Sketch a, Sketch b, boolean dstOrdered, org.apache.datasketches.memory.WritableMemory dstMem)`
Perform intersect set operation on the two given sketches and return the result as a CompactSketch.
`CompactSketch`
Union.`union(Sketch sketchA, Sketch sketchB)`
This implements a stateless, pair-wise union operation.
`abstract CompactSketch`
Union.`union(Sketch sketchA, Sketch sketchB, boolean dstOrdered, org.apache.datasketches.memory.WritableMemory dstMem)`
This implements a stateless, pair-wise union operation.
`static CompactSketch`
CompactSketch.`wrap(byte[] bytes)`
Wrap takes the sketch image in the given Memory and refers to it directly.
`static CompactSketch`
CompactSketch.`wrap(byte[] bytes, long expectedSeed)`
Wrap takes the sketch image in the given Memory and refers to it directly.
`static CompactSketch`
CompactSketch.`wrap(org.apache.datasketches.memory.Memory srcMem)`
Wrap takes the CompactSketch image in given Memory and refers to it directly.
`static CompactSketch`
CompactSketch.`wrap(org.apache.datasketches.memory.Memory srcMem, long expectedSeed)`
Wrap takes the sketch image in the given Memory and refers to it directly.
`static CompactSketch`
Sketches.`wrapCompactSketch(org.apache.datasketches.memory.Memory srcMem)`
Ref: `CompactSketch.wrap(Memory)`
`static CompactSketch`
Sketches.`wrapCompactSketch(org.apache.datasketches.memory.Memory srcMem, long expectedSeed)`
Ref: `CompactSketch.wrap(Memory, long)`