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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaggregate(int hash) Aggregates the hash value.voidAggregates the hash values.data()booleaninthashCode()voidmerge(SparseSketch other) Merge content of other into 'this'.protected voidonDeserialize(com.yahoo.vespa.objects.Deserializer buf) protected intprotected voidonSerialize(com.yahoo.vespa.objects.Serializer buf) Serializes the Sketch.intsize()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, visitMembersMethods 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:SketchMerge content of other into 'this'.- Specified by:
mergein classSketch<SparseSketch>- Parameters:
other- Other sketch
-
aggregate
Aggregates the hash values.- Specified by:
aggregatein classSketch<SparseSketch>- Parameters:
hashValues- Provides an iterator for the hash values
-
aggregate
public void aggregate(int hash) Aggregates the hash value.- Specified by:
aggregatein 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:
onSerializein classcom.yahoo.vespa.objects.Identifiable- Parameters:
buf- Serializer
-
onDeserialize
protected void onDeserialize(com.yahoo.vespa.objects.Deserializer buf) - Overrides:
onDeserializein classcom.yahoo.vespa.objects.Identifiable
-
onGetClassId
protected int onGetClassId()- Overrides:
onGetClassIdin classcom.yahoo.vespa.objects.Identifiable
-
data
-
size
public int size() -
equals
- Overrides:
equalsin classcom.yahoo.vespa.objects.Identifiable
-
hashCode
public int hashCode()- Overrides:
hashCodein classcom.yahoo.vespa.objects.Identifiable
-
toString
- Overrides:
toStringin classcom.yahoo.vespa.objects.Identifiable
-