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.
  • Field Summary

    Fields inherited from class com.yahoo.vespa.objects.Identifiable

    classId
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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

    Methods inherited from class com.yahoo.vespa.objects.Selectable

    select, select, selectMembers

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Sketch

      public Sketch()
  • Method Details

    • 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.