Class Sketch<T extends 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
      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
      • Methods inherited from class com.yahoo.vespa.objects.Selectable

        select, select, selectMembers
    • Constructor Detail

      • Sketch

        public Sketch()
    • 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.