Class Sketches


  • public final class Sketches
    extends Object
    Convenient static methods to instantiate generic tuple sketches.
    • Constructor Detail

      • Sketches

        public Sketches()
    • Method Detail

      • createEmptySketch

        public static <S extends SummarySketch<S> createEmptySketch()
        Type Parameters:
        S - Type of Summary
        Returns:
        an empty instance of Sketch
      • heapifySketch

        public static <S extends SummarySketch<S> heapifySketch​(org.apache.datasketches.memory.Memory mem,
                                                                  SummaryDeserializer<S> deserializer)
        Instantiate a Sketch from a given Memory.
        Type Parameters:
        S - Type of Summary
        Parameters:
        mem - Memory object representing a Sketch
        deserializer - instance of SummaryDeserializer
        Returns:
        Sketch created from its Memory representation
      • heapifyUpdatableSketch

        public static <U,​S extends UpdatableSummary<U>> UpdatableSketch<U,​S> heapifyUpdatableSketch​(org.apache.datasketches.memory.Memory mem,
                                                                                                                SummaryDeserializer<S> deserializer,
                                                                                                                SummaryFactory<S> summaryFactory)
        Instantiate UpdatableSketch from a given Memory
        Type Parameters:
        U - Type of update value
        S - Type of Summary
        Parameters:
        mem - Memory object representing a Sketch
        deserializer - instance of SummaryDeserializer
        summaryFactory - instance of SummaryFactory
        Returns:
        Sketch created from its Memory representation