Class HLLMetadata

    • Constructor Detail

      • HLLMetadata

        public HLLMetadata​(int schemaVersion,
                           HLLType type,
                           int registerCountLog2,
                           int registerWidth,
                           int log2ExplicitCutoff,
                           boolean explicitOff,
                           boolean explicitAuto,
                           boolean sparseEnabled)
        Parameters:
        schemaVersion - the schema version number of the HLL. This must be greater than or equal to zero.
        type - the type of the HLL. This cannot be null.
        registerCountLog2 - the log-base-2 register count parameter for probabilistic HLLs. This must be greater than or equal to zero.
        registerWidth - the register width parameter for probabilistic HLLs. This must be greater than or equal to zero.
        log2ExplicitCutoff - the log-base-2 of the explicit cardinality cutoff, if it is explicitly defined. (If explicitOff or explicitAuto is true then this has no meaning.)
        explicitOff - the flag for 'explicit off'-mode, where the HLLType.EXPLICIT representation is not used. Both this and explicitAuto cannot be true at the same time.
        explicitAuto - the flag for 'explicit auto'-mode, where the HLLType.EXPLICIT representation's promotion cutoff is determined based on in-memory size automatically. Both this and explicitOff cannot be true at the same time.
        sparseEnabled - the flag for 'sparse-enabled'-mode, where the HLLType.SPARSE representation is used.
    • Method Detail

      • schemaVersion

        public int schemaVersion()
        Specified by:
        schemaVersion in interface IHLLMetadata
        Returns:
        the schema version of the HLL. This will never be null.
      • HLLType

        public HLLType HLLType()
        Specified by:
        HLLType in interface IHLLMetadata
        Returns:
        the type of the HLL. This will never be null.
      • registerCountLog2

        public int registerCountLog2()
        Specified by:
        registerCountLog2 in interface IHLLMetadata
        Returns:
        the log-base-2 of the register count parameter of the HLL. This will always be greater than or equal to 4 and less than or equal to 31.
      • registerWidth

        public int registerWidth()
        Specified by:
        registerWidth in interface IHLLMetadata
        Returns:
        the register width parameter of the HLL. This will always be greater than or equal to 1 and less than or equal to 8.
      • log2ExplicitCutoff

        public int log2ExplicitCutoff()
        Specified by:
        log2ExplicitCutoff in interface IHLLMetadata
        Returns:
        the log-base-2 of the explicit cutoff cardinality. This will always be greater than or equal to zero and less than 31, per the specification.
      • explicitAuto

        public boolean explicitAuto()
        Specified by:
        explicitAuto in interface IHLLMetadata
        Returns:
        true if the HLLType.EXPLICIT representation cutoff cardinality is set to be automatically chosen, false otherwise.