Uses of Class
org.apache.datasketches.theta.Sketch
Package
Description
The theta package contains the basic sketch classes that are members of the
Theta Sketch Framework.
This package contains common tools and methods for the theta,
tuple, tuple/* and fdt packages.
The tuple package contains a number of sketches based on the same
fundamental algorithms of the Theta Sketch Framework and extend these
concepts for whole new families of sketches.
-
Uses of Sketch in org.apache.datasketches.theta
Modifier and TypeClassDescriptionclass
The parent class of all the CompactSketches.class
The parent class for the Update Sketch families, such as QuickSelect and Alpha.Modifier and TypeMethodDescriptionstatic Sketch
Sketch.heapify
(org.apache.datasketches.memory.Memory srcMem) Heapify takes the sketch image in Memory and instantiates an on-heap Sketch.static Sketch
Sketch.heapify
(org.apache.datasketches.memory.Memory srcMem, long expectedSeed) Heapify takes the sketch image in Memory and instantiates an on-heap Sketch.static Sketch
Sketches.heapifySketch
(org.apache.datasketches.memory.Memory srcMem) static Sketch
Sketches.heapifySketch
(org.apache.datasketches.memory.Memory srcMem, long expectedSeed) static Sketch
Sketch.wrap
(org.apache.datasketches.memory.Memory srcMem) Wrap takes the sketch image in the given Memory and refers to it directly.static Sketch
Sketch.wrap
(org.apache.datasketches.memory.Memory srcMem, long expectedSeed) Wrap takes the sketch image in the given Memory and refers to it directly.static Sketch
Sketches.wrapSketch
(org.apache.datasketches.memory.Memory srcMem) Ref:Sketch.wrap(Memory)
static Sketch
Sketches.wrapSketch
(org.apache.datasketches.memory.Memory srcMem, long expectedSeed) Modifier and TypeMethodDescriptionPerform 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.static boolean
JaccardSimilarity.dissimilarityTest
(Sketch measured, Sketch expected, double threshold) Tests dissimilarity of a measured Sketch against an expected Sketch.static boolean
JaccardSimilarity.exactlyEqual
(Sketch sketchA, Sketch sketchB) Returns true if the two given sketches have exactly the same hash values and the same theta values.abstract void
Intersect the given sketch with the internal state.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.static double[]
Computes the Jaccard similarity index with upper and lower bounds.abstract void
This is part of a multistep, stateful AnotB operation and sets the given Theta sketch as the second (or n+1th) argument B of A-AND-NOT-B.abstract void
This is part of a multistep, stateful AnotB operation and sets the given Theta sketch as the first argument A of A-AND-NOT-B.static boolean
JaccardSimilarity.similarityTest
(Sketch measured, Sketch expected, double threshold) Tests similarity of a measured Sketch against an expected Sketch.abstract void
Perform a Union operation with this union and the given on-heap sketch of the Theta Family.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. -
Uses of Sketch in org.apache.datasketches.thetacommon
Modifier and TypeMethodDescriptionstatic double
BoundsOnRatiosInThetaSketchedSets.getEstimateOfBoverA
(Sketch sketchA, Sketch sketchB) Gets the estimate for B over Astatic <S extends Summary>
doubleBoundsOnRatiosInTupleSketchedSets.getEstimateOfBoverA
(Sketch<S> sketchA, Sketch sketchB) Gets the estimate for B over Astatic double
BoundsOnRatiosInThetaSketchedSets.getLowerBoundForBoverA
(Sketch sketchA, Sketch sketchB) Gets the approximate lower bound for B over A based on a 95% confidence intervalstatic <S extends Summary>
doubleBoundsOnRatiosInTupleSketchedSets.getLowerBoundForBoverA
(Sketch<S> sketchA, Sketch sketchB) Gets the approximate lower bound for B over A based on a 95% confidence intervalstatic double
BoundsOnRatiosInThetaSketchedSets.getUpperBoundForBoverA
(Sketch sketchA, Sketch sketchB) Gets the approximate upper bound for B over A based on a 95% confidence intervalstatic <S extends Summary>
doubleBoundsOnRatiosInTupleSketchedSets.getUpperBoundForBoverA
(Sketch<S> sketchA, Sketch sketchB) Gets the approximate upper bound for B over A based on a 95% confidence interval -
Uses of Sketch in org.apache.datasketches.tuple
Modifier and TypeMethodDescriptionstatic <S extends Summary>
CompactSketch<S>Returns the A-and-not-B set operation on a Tuple sketch and a Theta sketch.static <S extends Summary>
booleanJaccardSimilarity.dissimilarityTest
(Sketch<S> measured, Sketch expected, S summary, SummarySetOperations<S> summarySetOps, double threshold) Tests dissimilarity of a measured Sketch against an expected Sketch.static <S extends Summary>
booleanJaccardSimilarity.exactlyEqual
(Sketch<S> sketchA, Sketch sketchB, S summary, SummarySetOperations<S> summarySetOps) Returns true if the two given sketches have exactly the same hash values and the same theta values.void
Performs a stateful intersection of the internal set with the given thetaSketch by combining entries using the hashes from the theta sketch and summary values from the given summary and rules from the summarySetOps defined by the Intersection constructor.Perform a stateless intersect set operation on a tuple sketch and a theta sketch and returns the result as an unordered CompactSketch on the heap.static <S extends Summary>
double[]JaccardSimilarity.jaccard
(Sketch<S> sketchA, Sketch sketchB, S summary, SummarySetOperations<S> summarySetOps) Computes the Jaccard similarity index with upper and lower bounds.void
This is part of a multistep, stateful AnotB operation and sets the given Theta sketch as the second (or n+1th) argument B of A-AND-NOT-B.static <S extends Summary>
booleanJaccardSimilarity.similarityTest
(Sketch<S> measured, Sketch expected, S summary, SummarySetOperations<S> summarySetOps, double threshold) Tests similarity of a measured Sketch against an expected Sketch.void
Performs a stateful union of the internal set with the given thetaSketch by combining entries using the hashes from the theta sketch and summary values from the given summary.Perform a stateless, pair-wise union operation between a tupleSketch and a thetaSketch.