S
- Type of Summarypublic class Intersection<S extends Summary> extends Object
Constructor and Description |
---|
Intersection(SummarySetOperations<S> summarySetOps)
Creates new Intersection instance with instructions on how to process two summaries that
intersect.
|
Modifier and Type | Method and Description |
---|---|
CompactSketch<S> |
getResult()
Gets the internal set as an unordered CompactSketch
|
boolean |
hasResult()
Returns true if there is a valid intersection result available
|
void |
intersect(Sketch<S> tupleSketch)
Performs a stateful intersection of the internal set with the given tupleSketch.
|
CompactSketch<S> |
intersect(Sketch<S> tupleSketchA,
Sketch<S> tupleSketchB)
Perform a stateless intersect set operation on the two given tuple sketches and returns the
result as an unordered CompactSketch on the heap.
|
CompactSketch<S> |
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.
|
void |
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.
|
void |
reset()
Resets the internal set to the initial state, which represents the Universal Set
|
void |
update(Sketch<S> tupleSketch)
Deprecated.
2.0.0. Please use
intersect(Sketch) . |
void |
update(Sketch thetaSketch,
S summary)
Deprecated.
2.0.0. Please use intersect(org.apache.datasketches.theta.Sketch, S).
|
public Intersection(SummarySetOperations<S> summarySetOps)
summarySetOps
- instance of SummarySetOperationspublic CompactSketch<S> intersect(Sketch<S> tupleSketchA, Sketch<S> tupleSketchB)
tupleSketchA
- The first sketch argument. It must not be null.tupleSketchB
- The second sketch argument. It must not be null.public CompactSketch<S> intersect(Sketch<S> tupleSketch, Sketch thetaSketch, S summary)
tupleSketch
- The first sketch argument. It must not be null.thetaSketch
- The second sketch argument. It must not be null.summary
- the given proxy summary for the theta sketch, which doesn't have one.
This must not be null.@Deprecated public void update(Sketch<S> tupleSketch)
intersect(Sketch)
.tupleSketch
- input sketch to intersect with the internal state. It must not be null.public void intersect(Sketch<S> tupleSketch)
tupleSketch
- input sketch to intersect with the internal state. It must not be null.@Deprecated public void update(Sketch thetaSketch, S summary)
thetaSketch
- input theta sketch to intersect with the internal state. It must not be null.summary
- the given proxy summary for the theta sketch, which doesn't have one.
It will be copied for each matching index. It must not be null.public void intersect(Sketch thetaSketch, S summary)
thetaSketch
- input theta sketch to intersect with the internal state. It must not be null.summary
- the given proxy summary for the theta sketch, which doesn't have one.
It will be copied for each matching index. It must not be null.public CompactSketch<S> getResult()
public boolean hasResult()
public void reset()
Copyright © 2015–2021 The Apache Software Foundation. All rights reserved.