Constructor and Description |
---|
Union(int nomEntries,
SummarySetOperations<S> summarySetOps)
Creates new Union instance.
|
Union(SummarySetOperations<S> summarySetOps)
Creates new Union instance with instructions on how to process two summaries that
overlap.
|
Modifier and Type | Method and Description |
---|---|
CompactSketch<S> |
getResult()
Gets the result of a sequence of stateful union operations as an unordered CompactSketch
|
CompactSketch<S> |
getResult(boolean reset)
Gets the result of a sequence of stateful union operations as an unordered CompactSketch.
|
void |
reset()
Resets the internal set to the initial state, which represents an empty set.
|
void |
union(Sketch<S> tupleSketch)
Performs a stateful union of the internal set with the given tupleSketch.
|
CompactSketch<S> |
union(Sketch<S> tupleSketchA,
Sketch<S> tupleSketchB)
Perform a stateless, pair-wise union operation between two tuple sketches.
|
CompactSketch<S> |
union(Sketch<S> tupleSketch,
Sketch thetaSketch,
S summary)
Perform a stateless, pair-wise union operation between a tupleSketch and a thetaSketch.
|
void |
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.
|
public Union(SummarySetOperations<S> summarySetOps)
summarySetOps
- instance of SummarySetOperationspublic Union(int nomEntries, SummarySetOperations<S> summarySetOps)
nomEntries
- nominal entries (K). Forced to the nearest power of 2 greater than
given value.summarySetOps
- instance of SummarySetOperationspublic CompactSketch<S> union(Sketch<S> tupleSketchA, Sketch<S> tupleSketchB)
Nulls and empty sketches are ignored.
tupleSketchA
- The first argumenttupleSketchB
- The second argumentpublic CompactSketch<S> union(Sketch<S> tupleSketch, Sketch thetaSketch, S summary)
Nulls and empty sketches are ignored.
tupleSketch
- The first argumentthetaSketch
- The second argumentsummary
- the given proxy summary for the theta sketch, which doesn't have one.
This may not be null.public void union(Sketch<S> tupleSketch)
tupleSketch
- input tuple sketch to merge with the internal set.
Nulls and empty sketches are ignored.
public void union(Sketch thetaSketch, S summary)
thetaSketch
- the given theta sketch input. If null or empty, it is ignored.summary
- the given proxy summary for the theta sketch, which doesn't have one. This may
not be null.public CompactSketch<S> getResult()
public CompactSketch<S> getResult(boolean reset)
reset
- If true, clears this operator to the empty state after this result is
returned. Set this to false if you wish to obtain an intermediate result.public void reset()
Copyright © 2015–2024 The Apache Software Foundation. All rights reserved.