Uses of Class
org.apache.datasketches.theta.Sketch

Packages that use Sketch 
Package Description
org.apache.datasketches
This package is the parent package for all sketch algorithms.
org.apache.datasketches.theta
The theta package contains all the sketch classes that are members of the Theta Sketch Framework.
org.apache.datasketches.tuple
The tuple package contains implementation of sketches based on the idea of theta sketches with the addition of values associated with unique keys.
  • Uses of Sketch in org.apache.datasketches

    Methods in org.apache.datasketches with parameters of type Sketch 
    Modifier and Type Method Description
    static double BoundsOnRatiosInThetaSketchedSets.getEstimateOfBoverA​(Sketch sketchA, Sketch sketchB)
    Gets the estimate for B over A
    static <S extends Summary>
    double
    BoundsOnRatiosInTupleSketchedSets.getEstimateOfBoverA​(Sketch<S> sketchA, Sketch sketchB)
    Gets the estimate for B over A
    static double BoundsOnRatiosInThetaSketchedSets.getLowerBoundForBoverA​(Sketch sketchA, Sketch sketchB)
    Gets the approximate lower bound for B over A based on a 95% confidence interval
    static <S extends Summary>
    double
    BoundsOnRatiosInTupleSketchedSets.getLowerBoundForBoverA​(Sketch<S> sketchA, Sketch sketchB)
    Gets the approximate lower bound for B over A based on a 95% confidence interval
    static double BoundsOnRatiosInThetaSketchedSets.getUpperBoundForBoverA​(Sketch sketchA, Sketch sketchB)
    Gets the approximate upper bound for B over A based on a 95% confidence interval
    static <S extends Summary>
    double
    BoundsOnRatiosInTupleSketchedSets.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.theta

    Subclasses of Sketch in org.apache.datasketches.theta 
    Modifier and Type Class Description
    class  CompactSketch
    The parent class of all the CompactSketches.
    class  UpdateSketch
    The parent class for the Update Sketch families, such as QuickSelect and Alpha.
    Methods in org.apache.datasketches.theta that return Sketch 
    Modifier and Type Method Description
    static Sketch Sketch.heapify​(org.apache.datasketches.memory.Memory srcMem)
    Heapify takes the sketch image in Memory and instantiates an on-heap Sketch using the Default Update Seed.
    static Sketch Sketch.heapify​(org.apache.datasketches.memory.Memory srcMem, long seed)
    Heapify takes the sketch image in Memory and instantiates an on-heap Sketch using the given seed.
    static Sketch Sketches.heapifySketch​(org.apache.datasketches.memory.Memory srcMem)
    static Sketch Sketches.heapifySketch​(org.apache.datasketches.memory.Memory srcMem, long seed)
    static Sketch Sketch.wrap​(org.apache.datasketches.memory.Memory srcMem)
    Wrap takes the sketch image in Memory and refers to it directly.
    static Sketch Sketch.wrap​(org.apache.datasketches.memory.Memory srcMem, long seed)
    Wrap takes the sketch image in Memory and refers to it directly with just a reference.
    static Sketch Sketches.wrapSketch​(org.apache.datasketches.memory.Memory srcMem)
    static Sketch Sketches.wrapSketch​(org.apache.datasketches.memory.Memory srcMem, long seed)
    Methods in org.apache.datasketches.theta with parameters of type Sketch 
    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.
    static CompactSketch PairwiseSetOperations.aNotB​(Sketch skA, Sketch skB)
    Deprecated.
    v2.0.0.
    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 Intersection.intersect​(Sketch sketchIn)
    Intersect the given sketch with the internal state.
    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.
    static CompactSketch PairwiseSetOperations.intersect​(Sketch skA, Sketch skB)
    Deprecated.
    v2.0.0.
    static double[] JaccardSimilarity.jaccard​(Sketch sketchA, Sketch sketchB)
    Computes the Jaccard similarity index with upper and lower bounds.
    abstract void AnotB.notB​(Sketch skB)
    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 AnotB.setA​(Sketch skA)
    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 Union.union​(Sketch sketchIn)
    Perform a Union operation with this union and the given on-heap sketch of the Theta Family.
    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.
  • Uses of Sketch in org.apache.datasketches.tuple

    Methods in org.apache.datasketches.tuple with parameters of type Sketch 
    Modifier and Type Method Description
    static <S extends Summary>
    CompactSketch<S>
    AnotB.aNotB​(Sketch<S> skA, Sketch skB)
    Returns the A-and-not-B set operation on a Tuple sketch and a Theta sketch.
    static <S extends Summary>
    boolean
    JaccardSimilarity.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>
    boolean
    JaccardSimilarity.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 Intersection.intersect​(Sketch thetaSketch, S summary)
    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.
    CompactSketch<S> Intersection.intersect​(Sketch<S> tupleSketch, Sketch thetaSketch, S summary)
    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 AnotB.notB​(Sketch skB)
    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>
    boolean
    JaccardSimilarity.similarityTest​(Sketch<S> measured, Sketch expected, S summary, SummarySetOperations<S> summarySetOps, double threshold)
    Tests similarity of a measured Sketch against an expected Sketch.
    void Union.union​(Sketch thetaSketch, S summary)
    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 and rules from the summarySetOps defined by the Union constructor.
    CompactSketch<S> Union.union​(Sketch<S> tupleSketch, Sketch thetaSketch, S summary)
    Perform a stateless, pair-wise union operation between a tupleSketch and a thetaSketch.