Class SparseSketch
java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
com.yahoo.searchlib.aggregation.hll.Sketch<SparseSketch>
com.yahoo.searchlib.aggregation.hll.SparseSketch
- All Implemented Interfaces:
Cloneable
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
aggregate
(int hash) Aggregates the hash value.void
Aggregates the hash values.data()
boolean
int
hashCode()
void
merge
(SparseSketch other) Merge content of other into 'this'.protected void
onDeserialize
(com.yahoo.vespa.objects.Deserializer buf) protected int
protected void
onSerialize
(com.yahoo.vespa.objects.Serializer buf) Serializes the Sketch.int
size()
toString()
Methods inherited from class com.yahoo.vespa.objects.Identifiable
clone, create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getRawUtf8Bytes, getUtf8, putUtf8, registerClass, serialize, serializeOptional, serializeWithId, visitMembers
Methods inherited from class com.yahoo.vespa.objects.Selectable
select, select, selectMembers
-
Field Details
-
classId
public static final int classId
-
-
Constructor Details
-
SparseSketch
public SparseSketch()
-
-
Method Details
-
merge
Description copied from class:Sketch
Merge content of other into 'this'.- Specified by:
merge
in classSketch<SparseSketch>
- Parameters:
other
- Other sketch
-
aggregate
Aggregates the hash values.- Specified by:
aggregate
in classSketch<SparseSketch>
- Parameters:
hashValues
- Provides an iterator for the hash values
-
aggregate
public void aggregate(int hash) Aggregates the hash value.- Specified by:
aggregate
in classSketch<SparseSketch>
- Parameters:
hash
- Hash value.
-
onSerialize
protected void onSerialize(com.yahoo.vespa.objects.Serializer buf) Serializes the Sketch. Serialization format ================== Number of elements: 4 bytes Elements: N * 4 bytes- Overrides:
onSerialize
in classcom.yahoo.vespa.objects.Identifiable
- Parameters:
buf
- Serializer
-
onDeserialize
protected void onDeserialize(com.yahoo.vespa.objects.Deserializer buf) - Overrides:
onDeserialize
in classcom.yahoo.vespa.objects.Identifiable
-
onGetClassId
protected int onGetClassId()- Overrides:
onGetClassId
in classcom.yahoo.vespa.objects.Identifiable
-
data
-
size
public int size() -
equals
- Overrides:
equals
in classcom.yahoo.vespa.objects.Identifiable
-
hashCode
public int hashCode()- Overrides:
hashCode
in classcom.yahoo.vespa.objects.Identifiable
-
toString
- Overrides:
toString
in classcom.yahoo.vespa.objects.Identifiable
-