Class CpcUnion


  • public class CpcUnion
    extends Object
    The union (merge) operation for the CPC sketches.
    Author:
    Lee Rhodes, Kevin Lang
    • Constructor Detail

      • CpcUnion

        public CpcUnion()
        Construct this unioning object with the default LgK and the default update seed.
      • CpcUnion

        public CpcUnion​(int lgK)
        Construct this unioning object with LgK and the default update seed.
        Parameters:
        lgK - The given log2 of K.
      • CpcUnion

        public CpcUnion​(int lgK,
                        long seed)
        Construct this unioning object with LgK and a given seed.
        Parameters:
        lgK - The given log2 of K.
        seed - The given seed.
    • Method Detail

      • update

        public void update​(CpcSketch sketch)
        Update this union with a CpcSketch.
        Parameters:
        sketch - the given CpcSketch.
      • getResult

        public CpcSketch getResult()
        Returns the result of union operations as a CPC sketch.
        Returns:
        the result of union operations as a CPC sketch.
      • getLgK

        public int getLgK()
        Returns the current value of Log_base2 of K. Note that due to merging with source sketches that may have a lower value of LgK, this value can be less than what the union object was configured with.
        Returns:
        the current value of Log_base2 of K.
      • getFamily

        public static Family getFamily()
        Return the DataSketches identifier for this CPC family of sketches.
        Returns:
        the DataSketches identifier for this CPC family of sketches.