Class Sketch<T extends Sketch<T>>
- java.lang.Object
-
- com.yahoo.vespa.objects.Selectable
-
- com.yahoo.vespa.objects.Identifiable
-
- com.yahoo.searchlib.aggregation.hll.Sketch<T>
-
- Type Parameters:
T
- The type of the sub-class.
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
NormalSketch
,SparseSketch
public abstract class Sketch<T extends Sketch<T>> extends com.yahoo.vespa.objects.Identifiable
Represents a sketch. All sketch types must provide a merge method.
-
-
Constructor Summary
Constructors Constructor Description Sketch()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract void
aggregate(int hash)
Aggregates the hash value.abstract void
aggregate(Iterable<Integer> hashValues)
Aggregates the hash values.abstract void
merge(T other)
Merge content of other into 'this'.-
Methods inherited from class com.yahoo.vespa.objects.Identifiable
clone, create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, equals, getClassId, getRawUtf8Bytes, getUtf8, hashCode, onDeserialize, onGetClassId, onSerialize, putUtf8, registerClass, serialize, serializeOptional, serializeWithId, toString, visitMembers
-
-
-
-
Method Detail
-
merge
public abstract void merge(T other)
Merge content of other into 'this'.- Parameters:
other
- Other sketch
-
aggregate
public abstract void aggregate(Iterable<Integer> hashValues)
Aggregates the hash values.- Parameters:
hashValues
- Provides an iterator for the hash values
-
aggregate
public abstract void aggregate(int hash)
Aggregates the hash value.- Parameters:
hash
- Hash value.
-
-