Skip navigation links
A B C D E F G H I L M N P R S T U V W 

A

addRaw(long) - Method in class net.agkn.hll.HLL
Adds rawValue directly to the HLL.
alphaMSquared(int) - Static method in class net.agkn.hll.util.HLLUtil
Computes the 'alpha-m-squared' constant used by the HyperLogLog algorithm.

B

BigEndianAscendingWordDeserializer - Class in net.agkn.hll.serialization
A corresponding deserializer for BigEndianAscendingWordSerializer.
BigEndianAscendingWordDeserializer(int, int, byte[]) - Constructor for class net.agkn.hll.serialization.BigEndianAscendingWordDeserializer
 
BigEndianAscendingWordSerializer - Class in net.agkn.hll.serialization
A serializer that writes a sequence of fixed bit-width 'words' to a byte array.
BigEndianAscendingWordSerializer(int, int, int) - Constructor for class net.agkn.hll.serialization.BigEndianAscendingWordSerializer
 
BITS_PER_BYTE - Static variable in class net.agkn.hll.util.BitVector
 
BitUtil - Class in net.agkn.hll.util
A collection of bit utilities.
BitUtil() - Constructor for class net.agkn.hll.util.BitUtil
 
BitVector - Class in net.agkn.hll.util
A vector (array) of bits that is accessed in units ("registers") of width bits which are stored as 64bit "words" (longs).
BitVector(int, long) - Constructor for class net.agkn.hll.util.BitVector
 
byteCount() - Method in class net.agkn.hll.util.BitVector
 
BYTES_PER_WORD - Static variable in class net.agkn.hll.util.BitVector
 

C

cardinality() - Method in class net.agkn.hll.HLL
Computes the cardinality of the HLL.
clear() - Method in class net.agkn.hll.HLL
Clears the HLL.
clone() - Method in class net.agkn.hll.HLL
Create a deep copy of this HLL.
clone() - Method in class net.agkn.hll.util.BitVector
Creates a deep copy of this vector.

D

DEFAULT_SCHEMA_VERSION - Static variable in class net.agkn.hll.serialization.SerializationUtil
The default schema version for serializing HLLs.

E

explicitAuto() - Method in class net.agkn.hll.serialization.HLLMetadata
 
explicitAuto() - Method in interface net.agkn.hll.serialization.IHLLMetadata
 
explicitCutoff(byte) - Static method in class net.agkn.hll.serialization.SerializationUtil
Extracts the explicit cutoff value from the cutoff byte of a serialized HLL.
explicitOff() - Method in class net.agkn.hll.serialization.HLLMetadata
 
explicitOff() - Method in interface net.agkn.hll.serialization.IHLLMetadata
 

F

fill(long) - Method in class net.agkn.hll.util.BitVector
Fills this bit vector with the specified bit value.
fromBytes(byte[]) - Static method in class net.agkn.hll.HLL
Deserializes the HLL (in HLL.toBytes(ISchemaVersion) format) serialized into bytes.

fromHex(String, int, int) - Static method in class net.agkn.hll.util.NumberUtil
Converts the specified array of hex characters into an array of bytes (low byte first).

G

getBytes() - Method in class net.agkn.hll.serialization.BigEndianAscendingWordSerializer
 
getBytes() - Method in interface net.agkn.hll.serialization.IWordSerializer
Returns the backing array of bytes that contain the serialized words.
getDeserializer(HLLType, int, byte[]) - Method in interface net.agkn.hll.serialization.ISchemaVersion
Builds an HLL deserializer that matches this schema version.
getDeserializer(HLLType, int, byte[]) - Method in class net.agkn.hll.serialization.SchemaVersionOne
 
getRegister(long) - Method in class net.agkn.hll.util.BitVector
 
getRegisterContents(IWordSerializer) - Method in class net.agkn.hll.util.BitVector
Serializes the registers of the vector using the specified serializer.
getSchemaVersion(int) - Static method in class net.agkn.hll.serialization.SerializationUtil
 
getSchemaVersion(byte[]) - Static method in class net.agkn.hll.serialization.SerializationUtil
Get the appropriate schema version for the specified serialized HLL.
getSerializer(HLLType, int, int) - Method in interface net.agkn.hll.serialization.ISchemaVersion
Builds an HLL serializer that matches this schema version.
getSerializer(HLLType, int, int) - Method in class net.agkn.hll.serialization.SchemaVersionOne
 
getType() - Method in class net.agkn.hll.HLL
 

H

hasNext() - Method in interface net.agkn.hll.util.LongIterator
 
HLL - Class in net.agkn.hll
A probabilistic set of hashed long elements.
HLL(int, int, int, boolean, HLLType) - Constructor for class net.agkn.hll.HLL
NOTE: Arguments here are named and structured identically to those in the PostgreSQL implementation, which can be found here.
HLL(int, int) - Constructor for class net.agkn.hll.HLL
Construct an empty HLL with the given log2m and regwidth.

This is equivalent to calling HLL(log2m, regwidth, -1, true, HLLType.EMPTY).

HLLMetadata - Class in net.agkn.hll.serialization
A concrete IHLLMetadata implemented as a simple struct.
HLLMetadata(int, HLLType, int, int, int, boolean, boolean, boolean) - Constructor for class net.agkn.hll.serialization.HLLMetadata
 
HLLType - Enum in net.agkn.hll
The types of algorithm/data structure that HLL can utilize.
HLLType() - Method in class net.agkn.hll.serialization.HLLMetadata
 
HLLType() - Method in interface net.agkn.hll.serialization.IHLLMetadata
 
HLLUtil - Class in net.agkn.hll.util
Static functions for computing constants and parameters used in the HLL algorithm.
HLLUtil() - Constructor for class net.agkn.hll.util.HLLUtil
 

I

IHLLMetadata - Interface in net.agkn.hll.serialization
The metadata and parameters associated with a HLL.
ISchemaVersion - Interface in net.agkn.hll.serialization
A serialization schema for HLLs.
IWordDeserializer - Interface in net.agkn.hll.serialization
Reads 'words' of a fixed width, in sequence, from a byte array.
IWordSerializer - Interface in net.agkn.hll.serialization
Writes 'words' of fixed width, in sequence, to a byte array.

L

largeEstimator(int, int, double) - Static method in class net.agkn.hll.util.HLLUtil
The "large range correction" formula from the HyperLogLog algorithm, adapted for 64 bit hashes.
largeEstimatorCutoff(int, int) - Static method in class net.agkn.hll.util.HLLUtil
The cutoff for using the "large range correction" formula, from the HyperLogLog algorithm, adapted for 64 bit hashes.
leastSignificantBit(long) - Static method in class net.agkn.hll.util.BitUtil
Computes the least-significant bit of the specified long that is set to 1.
log2(double) - Static method in class net.agkn.hll.util.NumberUtil
Computes the log2 (log-base-two) of the specified value.
log2ExplicitCutoff() - Method in class net.agkn.hll.serialization.HLLMetadata
 
log2ExplicitCutoff() - Method in interface net.agkn.hll.serialization.IHLLMetadata
 
LOGE_2 - Static variable in class net.agkn.hll.util.NumberUtil
 
LongIterator - Interface in net.agkn.hll.util
A long-based iterator.

M

MAXIMUM_EXPLICIT_THRESHOLD - Static variable in class net.agkn.hll.HLL
 
MAXIMUM_EXPTHRESH_PARAM - Static variable in class net.agkn.hll.HLL
 
MAXIMUM_LOG2M_PARAM - Static variable in class net.agkn.hll.HLL
 
MAXIMUM_REGWIDTH_PARAM - Static variable in class net.agkn.hll.HLL
 
MINIMUM_EXPTHRESH_PARAM - Static variable in class net.agkn.hll.HLL
 
MINIMUM_LOG2M_PARAM - Static variable in class net.agkn.hll.HLL
 
MINIMUM_REGWIDTH_PARAM - Static variable in class net.agkn.hll.HLL
 

N

net.agkn.hll - package net.agkn.hll
 
net.agkn.hll.serialization - package net.agkn.hll.serialization
 
net.agkn.hll.util - package net.agkn.hll.util
 
next() - Method in interface net.agkn.hll.util.LongIterator
 
NumberUtil - Class in net.agkn.hll.util
A collection of utilities to work with numbers.
NumberUtil() - Constructor for class net.agkn.hll.util.NumberUtil
 

P

packCutoffByte(int, boolean) - Static method in class net.agkn.hll.serialization.SerializationUtil
Generates a byte that encodes the log-base-2 of the explicit cutoff or sentinel values for 'explicit-disabled' or 'auto', as well as the boolean indicating whether to use HLLType.SPARSE in the promotion hierarchy.
packParametersByte(int, int) - Static method in class net.agkn.hll.serialization.SerializationUtil
Generates a byte that encodes the parameters of a HLLType.FULL or HLLType.SPARSE HLL.

The top 3 bits are used to encode registerWidth - 1 (range of registerWidth is thus 1-9) and the bottom 5 bits are used to encode registerCountLog2 (range of registerCountLog2 is thus 0-31).

packVersionByte(int, int) - Static method in class net.agkn.hll.serialization.SerializationUtil
Generates a byte that encodes the schema version and the type ordinal of the HLL.
paddingBytes(HLLType) - Method in interface net.agkn.hll.serialization.ISchemaVersion
The number of metadata bytes required for a serialized HLL of the specified type.
paddingBytes(HLLType) - Method in class net.agkn.hll.serialization.SchemaVersionOne
 
pwMaxMask(int) - Static method in class net.agkn.hll.util.HLLUtil
Computes a mask that prevents overflow of HyperLogLog registers.

R

readMetadata(byte[]) - Method in interface net.agkn.hll.serialization.ISchemaVersion
Reads the metadata bytes of the serialized HLL.
readMetadata(byte[]) - Method in class net.agkn.hll.serialization.SchemaVersionOne
 
readWord() - Method in class net.agkn.hll.serialization.BigEndianAscendingWordDeserializer
 
readWord() - Method in interface net.agkn.hll.serialization.IWordDeserializer
 
registerBitSize(long) - Static method in class net.agkn.hll.util.HLLUtil
Computes the bit-width of HLL registers necessary to estimate a set of the specified cardinality.
registerCountLog2() - Method in class net.agkn.hll.serialization.HLLMetadata
 
registerCountLog2() - Method in interface net.agkn.hll.serialization.IHLLMetadata
 
registerCountLog2(byte) - Static method in class net.agkn.hll.serialization.SerializationUtil
Extracts the log2(registerCount) from the parameters byte of a serialized HLLType.FULL HLL.
REGISTERED_SCHEMA_VERSIONS - Static variable in class net.agkn.hll.serialization.SerializationUtil
List of registered schema versions, indexed by their version numbers.
registerIterator() - Method in class net.agkn.hll.util.BitVector
 
registerWidth() - Method in class net.agkn.hll.serialization.HLLMetadata
 
registerWidth() - Method in interface net.agkn.hll.serialization.IHLLMetadata
 
registerWidth(byte) - Static method in class net.agkn.hll.serialization.SerializationUtil
Extracts the register width from the parameters byte of a serialized HLLType.FULL HLL.
registerWidth() - Method in class net.agkn.hll.util.BitVector
 

S

SCHEMA_VERSION - Static variable in class net.agkn.hll.serialization.SchemaVersionOne
The schema version number for this instance.
schemaVersion() - Method in class net.agkn.hll.serialization.HLLMetadata
 
schemaVersion() - Method in interface net.agkn.hll.serialization.IHLLMetadata
 
schemaVersion(byte) - Static method in class net.agkn.hll.serialization.SerializationUtil
Extracts the schema version from the version byte of a serialized HLL.
schemaVersionNumber() - Method in interface net.agkn.hll.serialization.ISchemaVersion
 
schemaVersionNumber() - Method in class net.agkn.hll.serialization.SchemaVersionOne
 
SchemaVersionOne - Class in net.agkn.hll.serialization
A concrete ISchemaVersion representing schema version one.
SchemaVersionOne() - Constructor for class net.agkn.hll.serialization.SchemaVersionOne
 
SerializationUtil - Class in net.agkn.hll.serialization
A collection of constants and utilities for serializing and deserializing HLLs.
SerializationUtil() - Constructor for class net.agkn.hll.serialization.SerializationUtil
 
setMaxRegister(long, long) - Method in class net.agkn.hll.util.BitVector
Sets the value of the specified index register if and only if the specified value is greater than the current value in the register.
setRegister(long, long) - Method in class net.agkn.hll.util.BitVector
 
smallEstimator(int, int) - Static method in class net.agkn.hll.util.HLLUtil
The "small range correction" formula from the HyperLogLog algorithm.
smallEstimatorCutoff(int) - Static method in class net.agkn.hll.util.HLLUtil
The cutoff for using the "small range correction" formula, in the HyperLogLog algorithm.
sparseEnabled() - Method in class net.agkn.hll.serialization.HLLMetadata
 
sparseEnabled() - Method in interface net.agkn.hll.serialization.IHLLMetadata
 
sparseEnabled(byte) - Static method in class net.agkn.hll.serialization.SerializationUtil
Extracts the 'sparse-enabled' boolean from the cutoff byte of a serialized HLL.

T

toBytes() - Method in class net.agkn.hll.HLL
Serializes the HLL to an array of bytes in correspondence with the format of the default schema version, SerializationUtil.DEFAULT_SCHEMA_VERSION.
toBytes(ISchemaVersion) - Method in class net.agkn.hll.HLL
Serializes the HLL to an array of bytes in correspondence with the format of the specified schema version.
toHex(byte[], int, int) - Static method in class net.agkn.hll.util.NumberUtil
Converts the specified array of bytes into a string of hex characters (low byte first).
toString() - Method in class net.agkn.hll.serialization.HLLMetadata
 
totalWordCount() - Method in class net.agkn.hll.serialization.BigEndianAscendingWordDeserializer
 
totalWordCount() - Method in interface net.agkn.hll.serialization.IWordDeserializer
Returns the number of words that could be encoded in the sequence.

NOTE: the sequence that was encoded may be shorter than the value this method returns due to padding issues within bytes.

typeOrdinal(byte) - Static method in class net.agkn.hll.serialization.SerializationUtil
Extracts the type ordinal from the version byte of a serialized HLL.

U

union(HLL) - Method in class net.agkn.hll.HLL
Computes the union of HLLs and stores the result in this instance.

V

valueOf(String) - Static method in enum net.agkn.hll.HLLType
Returns the enum constant of this type with the specified name.
values() - Static method in enum net.agkn.hll.HLLType
Returns an array containing the constants of this enum type, in the order they are declared.
VERSION_ONE - Static variable in class net.agkn.hll.serialization.SerializationUtil
Schema version one (v1).

W

wordCount() - Method in class net.agkn.hll.util.BitVector
 
words() - Method in class net.agkn.hll.util.BitVector
 
writeMetadata(byte[], IHLLMetadata) - Method in interface net.agkn.hll.serialization.ISchemaVersion
Writes metadata bytes to serialized HLL.
writeMetadata(byte[], IHLLMetadata) - Method in class net.agkn.hll.serialization.SchemaVersionOne
 
writeWord(long) - Method in class net.agkn.hll.serialization.BigEndianAscendingWordSerializer
 
writeWord(long) - Method in interface net.agkn.hll.serialization.IWordSerializer
Writes the word to the backing array.
A B C D E F G H I L M N P R S T U V W 
Skip navigation links

Copyright © 2019. All rights reserved.