# Uses of Class
org.apache.datasketches.tuple.TupleSketch

Packages that use TupleSketch
Package
Description
org.apache.datasketches.fdt
Frequent Distinct Tuples Sketch
org.apache.datasketches.thetacommon
This package contains common tools and methods for the theta, tuple, tuple/* and fdt packages.
org.apache.datasketches.tuple
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.
org.apache.datasketches.tuple.adouble
This package is for a generic implementation of the Tuple sketch for single Double value.
org.apache.datasketches.tuple.aninteger
This package is for a generic implementation of the Tuple sketch for single Integer value.
org.apache.datasketches.tuple.strings
This package is for a generic implementation of the Tuple sketch for single String value.

## Uses of TupleSketch in org.apache.datasketches.fdt

Subclasses of TupleSketch in org.apache.datasketches.fdt
Modifier and Type
Class
Description
`final class`
`FdtSketch`
A Frequent Distinct Tuples sketch.

## Uses of TupleSketch in org.apache.datasketches.thetacommon

Methods in org.apache.datasketches.thetacommon with parameters of type TupleSketch
Modifier and Type
Method
Description
`static <S extends Summary>
double`
BoundsOnRatiosInTupleSketchedSets.`getEstimateOfBoverA(TupleSketch<S> sketchA, ThetaSketch sketchB)`
Gets the estimate for B over A
`static <S extends Summary>
double`
BoundsOnRatiosInTupleSketchedSets.`getEstimateOfBoverA(TupleSketch<S> sketchA, TupleSketch<S> sketchB)`
Gets the estimate for B over A
`static <S extends Summary>
double`
BoundsOnRatiosInTupleSketchedSets.`getLowerBoundForBoverA(TupleSketch<S> sketchA, ThetaSketch sketchB)`
Gets the approximate lower bound for B over A based on a 95% confidence interval
`static <S extends Summary>
double`
BoundsOnRatiosInTupleSketchedSets.`getLowerBoundForBoverA(TupleSketch<S> sketchA, TupleSketch<S> sketchB)`
Gets the approximate lower bound for B over A based on a 95% confidence interval
`static <S extends Summary>
double`
BoundsOnRatiosInTupleSketchedSets.`getUpperBoundForBoverA(TupleSketch<S> sketchA, ThetaSketch sketchB)`
Gets the approximate upper bound for B over A based on a 95% confidence interval
`static <S extends Summary>
double`
BoundsOnRatiosInTupleSketchedSets.`getUpperBoundForBoverA(TupleSketch<S> sketchA, TupleSketch<S> sketchB)`
Gets the approximate upper bound for B over A based on a 95% confidence interval

## Uses of TupleSketch in org.apache.datasketches.tuple

Subclasses of TupleSketch in org.apache.datasketches.tuple
Modifier and Type
Class
Description
`final class`
`CompactTupleSketch<S extends Summary>`
CompactTupleSketches are never created directly.
`class`
`UpdatableTupleSketch<U, S extends UpdatableSummary<U>>`
An extension of QuickSelectSketch<S>, which can be updated with many types of keys.
Methods in org.apache.datasketches.tuple that return TupleSketch
Modifier and Type
Method
Description
`static <S extends Summary>
TupleSketch<S>`
TupleSketch.`createEmptySketch()`
Creates an empty CompactTupleSketch.
`static <S extends Summary>
TupleSketch<S>`
TupleSketch.`heapifySketch(MemorySegment seg, SummaryDeserializer<S> deserializer)`
Instantiate a TupleSketch from a given MemorySegment.
Methods in org.apache.datasketches.tuple with parameters of type TupleSketch
Modifier and Type
Method
Description
`static <S extends Summary>
CompactTupleSketch<S>`
TupleAnotB.`aNotB(TupleSketch<S> skA, ThetaSketch skB)`
Returns the A-and-not-B set operation on a TupleSketch and a ThetaSketch.
`static <S extends Summary>
CompactTupleSketch<S>`
TupleAnotB.`aNotB(TupleSketch<S> skA, TupleSketch<S> skB)`
Returns the A-and-not-B set operation on the two given TupleSketches.
`static <S extends Summary>
boolean`
JaccardSimilarity.`dissimilarityTest(TupleSketch<S> measured, ThetaSketch expected, S summary, SummarySetOperations<S> summarySetOps, double threshold)`
Tests dissimilarity of a measured TupleSketch against an expected ThetaSketch.
`static <S extends Summary>
boolean`
JaccardSimilarity.`dissimilarityTest(TupleSketch<S> measured, TupleSketch<S> expected, SummarySetOperations<S> summarySetOps, double threshold)`
Tests dissimilarity of a measured TupleSketch against an expected TupleSketch.
`static <S extends Summary>
boolean`
JaccardSimilarity.`exactlyEqual(TupleSketch<S> sketchA, ThetaSketch sketchB, S summary, SummarySetOperations<S> summarySetOps)`
Returns true if the two given sketches have exactly the same hash values and the same theta values.
`static <S extends Summary>
boolean`
JaccardSimilarity.`exactlyEqual(TupleSketch<S> sketchA, TupleSketch<S> sketchB, SummarySetOperations<S> summarySetOps)`
Returns true if the two given sketches have exactly the same hash values and the same theta values.
`CompactTupleSketch<T>`
Filter.`filter(TupleSketch<T> sketchIn)`
Filters elements on the provided `TupleSketch`
`void`
TupleIntersection.`intersect(TupleSketch<S> tupleSketch)`
Performs a stateful intersection of the internal set with the given TupleSketch.
`CompactTupleSketch<S>`
TupleIntersection.`intersect(TupleSketch<S> tupleSketch, ThetaSketch thetaSketch, S summary)`
Perform a stateless intersect set operation on a TupleSketch and a ThetaSketch and returns the result as an unordered CompactTupleSketch on the heap.
`CompactTupleSketch<S>`
TupleIntersection.`intersect(TupleSketch<S> tupleSketchA, TupleSketch<S> tupleSketchB)`
Perform a stateless intersect set operation on the two given TupleSketches and returns the result as an unordered CompactTupleSketch on the heap.
`static <S extends Summary>
double[]`
JaccardSimilarity.`jaccard(TupleSketch<S> sketchA, ThetaSketch sketchB, S summary, SummarySetOperations<S> summarySetOps)`
Computes the Jaccard similarity index with upper and lower bounds.
`static <S extends Summary>
double[]`
JaccardSimilarity.`jaccard(TupleSketch<S> sketchA, TupleSketch<S> sketchB, SummarySetOperations<S> summarySetOps)`
Computes the Jaccard similarity index with upper and lower bounds.
`void`
TupleAnotB.`notB(TupleSketch<S> skB)`
This is part of a multistep, stateful TupleAnotB operation and sets the given TupleSketch as the second (or n+1th) argument B of A-AND-NOT-B.
`void`
TupleAnotB.`setA(TupleSketch<S> skA)`
This is part of a multistep, stateful TupleAnotB operation and sets the given TupleSketch as the first argument A of A-AND-NOT-B.
`static <S extends Summary>
boolean`
JaccardSimilarity.`similarityTest(TupleSketch<S> measured, ThetaSketch expected, S summary, SummarySetOperations<S> summarySetOps, double threshold)`
Tests similarity of a measured TupleSketch against an expected ThetaSketch.
`static <S extends Summary>
boolean`
JaccardSimilarity.`similarityTest(TupleSketch<S> measured, TupleSketch<S> expected, SummarySetOperations<S> summarySetOps, double threshold)`
Tests similarity of a measured TupleSketch against an expected TupleSketch.
`void`
TupleUnion.`union(TupleSketch<S> tupleSketch)`
Performs a stateful union of the internal set with the given TupleSketch.
`CompactTupleSketch<S>`
TupleUnion.`union(TupleSketch<S> tupleSketch, ThetaSketch thetaSketch, S summary)`
Perform a stateless, pair-wise union operation between a tupleSketch and a ThetaSketch.
`CompactTupleSketch<S>`
TupleUnion.`union(TupleSketch<S> tupleSketchA, TupleSketch<S> tupleSketchB)`
Perform a stateless, pair-wise union operation between two tuple sketches.

## Uses of TupleSketch in org.apache.datasketches.tuple.adouble

Subclasses of TupleSketch in org.apache.datasketches.tuple.adouble
Modifier and Type
Class
Description
`class`
`DoubleTupleSketch`
Extends UpdatableTupleSketch<Double, DoubleSummary>

## Uses of TupleSketch in org.apache.datasketches.tuple.aninteger

Subclasses of TupleSketch in org.apache.datasketches.tuple.aninteger
Modifier and Type
Class
Description
`class`
`IntegerTupleSketch`
Extends UpdatableTupleSketch<Integer, IntegerSummary>

## Uses of TupleSketch in org.apache.datasketches.tuple.strings

Subclasses of TupleSketch in org.apache.datasketches.tuple.strings
Modifier and Type
Class
Description
`class`
`ArrayOfStringsTupleSketch`
Extends UpdatableTupleSketch<String[], ArrayOfStringsSummary>