java.lang.Object
com.carrotsearch.hppc.HashContainers
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatDefault load factor.static final intMaximum array size for hash containers (power-of-two and still allocable in Java, not a negative int).static final floatMaximum sane load factor (1 empty slot per 100).static final intMinimum hash buffer size.static final floatMinimal sane load factor (99 empty slots per 100). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intmaxElements(double loadFactor) Compute and return the maximum number of elements (inclusive) that can be stored in a hash container for a given load factor.
-
Field Details
-
MAX_HASH_ARRAY_LENGTH
public static final int MAX_HASH_ARRAY_LENGTHMaximum array size for hash containers (power-of-two and still allocable in Java, not a negative int).- See Also:
-
MIN_HASH_ARRAY_LENGTH
public static final int MIN_HASH_ARRAY_LENGTHMinimum hash buffer size.- See Also:
-
DEFAULT_LOAD_FACTOR
public static final float DEFAULT_LOAD_FACTORDefault load factor.- See Also:
-
MIN_LOAD_FACTOR
public static final float MIN_LOAD_FACTORMinimal sane load factor (99 empty slots per 100).- See Also:
-
MAX_LOAD_FACTOR
public static final float MAX_LOAD_FACTORMaximum sane load factor (1 empty slot per 100).- See Also:
-
-
Constructor Details
-
HashContainers
public HashContainers()
-
-
Method Details
-
maxElements
public static int maxElements(double loadFactor) Compute and return the maximum number of elements (inclusive) that can be stored in a hash container for a given load factor.
-