Class ArrayOfDoublesIntersection
java.lang.Object
org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesIntersection
Computes the intersection of two or more tuple sketches of type ArrayOfDoubles.
A new instance represents the Universal Set.
Every update() computes an intersection with the internal set
and can only reduce the internal set.
-
Method Summary
Modifier and TypeMethodDescriptionGets the internal set as an on-heap compact sketch.getResult
(org.apache.datasketches.memory.WritableMemory dstMem) Gets the result of stateful intersections so far.void
intersect
(ArrayOfDoublesSketch tupleSketch, ArrayOfDoublesCombiner combiner) Performs a stateful intersection of the internal set with the given tupleSketch.void
reset()
Resets the internal set to the initial state, which represents the Universal Set
-
Method Details
-
intersect
Performs a stateful intersection of the internal set with the given tupleSketch. The given tupleSketch and the internal state must have the same numValues.- Parameters:
tupleSketch
- Input sketch to intersect with the internal set.combiner
- Method of combining two arrays of double values
-
getResult
Gets the internal set as an on-heap compact sketch.- Returns:
- Result of the intersections so far as a compact sketch.
-
getResult
Gets the result of stateful intersections so far.- Parameters:
dstMem
- Memory for the compact sketch (can be null).- Returns:
- Result of the intersections so far as a compact sketch.
-
reset
public void reset()Resets the internal set to the initial state, which represents the Universal Set
-