public abstract class Union extends SetOperation
| Constructor and Description |
|---|
Union() |
| Modifier and Type | Method and Description |
|---|---|
Family |
getFamily()
Gets the Family of this SetOperation
|
abstract CompactSketch |
getResult()
Gets the result of this operation as an ordered CompactSketch on the Java heap.
|
abstract CompactSketch |
getResult(boolean dstOrdered,
org.apache.datasketches.memory.WritableMemory dstMem)
Gets the result of this operation as a CompactSketch of the chosen form.
|
abstract void |
reset()
Resets this Union.
|
abstract byte[] |
toByteArray()
Returns a byte array image of this Union object
|
abstract void |
update(byte[] data)
Present this union with the given byte array.
|
abstract void |
update(char[] data)
Present this union with the given char array.
|
abstract void |
update(double datum)
Present this union with the given double (or float) datum.
|
abstract void |
update(int[] data)
Present this union with the given integer array.
|
abstract void |
update(long datum)
Present this union with a long.
|
abstract void |
update(long[] data)
Present this union with the given long array.
|
abstract void |
update(org.apache.datasketches.memory.Memory mem)
Union the given Memory image of the OpenSource Theta Sketch,
which may be ordered or unordered, or the earlier versions of SetSketch,
which must be compact and ordered.
|
abstract void |
update(Sketch sketchIn)
Union the given on-heap sketch.
|
abstract void |
update(String datum)
Present this union with the given String.
|
builder, getMaxIntersectionBytes, getMaxUnionBytes, heapify, heapify, isSameResource, wrap, wrap, wrap, wrappublic Family getFamily()
SetOperationgetFamily in class SetOperationpublic abstract CompactSketch getResult(boolean dstOrdered, org.apache.datasketches.memory.WritableMemory dstMem)
dstOrdered - See Destination OrdereddstMem - See Destination Memory.public abstract CompactSketch getResult()
public abstract void reset()
public abstract byte[] toByteArray()
public abstract void update(Sketch sketchIn)
sketchIn - The incoming sketch.public abstract void update(org.apache.datasketches.memory.Memory mem)
This method can be repeatedly called. If the given sketch is null it is interpreted as an empty sketch.
mem - Memory image of sketch to be mergedpublic abstract void update(long datum)
datum - The given long datum.public abstract void update(double datum)
datum - The given double datum.public abstract void update(String datum)
Note: this will not produce the same output hash values as the update(char[])
method and will generally be a little slower depending on the complexity of the UTF8 encoding.
datum - The given String.public abstract void update(byte[] data)
data - The given byte array.public abstract void update(int[] data)
data - The given int array.public abstract void update(char[] data)
Note: this will not produce the same output hash values as the update(String)
method but will be a little faster as it avoids the complexity of the UTF8 encoding.
data - The given char array.public abstract void update(long[] data)
data - The given long array.Copyright © 2015–2020 The Apache Software Foundation. All rights reserved.