java.lang.Object
org.apache.lucene.internal.hppc.HashContainers
Constants for primitive maps.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int
(package private) static final float
(package private) static final AtomicInteger
(package private) static final int
Maximum array size for hash containers (power-of-two and still allocable in Java, not a negative int).(package private) static final float
Maximum sane load factor (1 empty slot per 100).(package private) static final int
Minimum hash buffer size.(package private) static final float
Minimal sane load factor (99 empty slots per 100). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static void
checkLoadFactor
(double loadFactor, double minAllowedInclusive, double maxAllowedInclusive) (package private) static boolean
checkPowerOfTwo
(int arraySize) (package private) static int
expandAtCount
(int arraySize, double loadFactor) (package private) static int
iterationIncrement
(int seed) (package private) static int
minBufferSize
(int elements, double loadFactor) (package private) static int
nextBufferSize
(int arraySize, int elements, double loadFactor)
-
Field Details
-
DEFAULT_EXPECTED_ELEMENTS
static final int DEFAULT_EXPECTED_ELEMENTS- See Also:
-
DEFAULT_LOAD_FACTOR
static final float DEFAULT_LOAD_FACTOR- See Also:
-
MIN_LOAD_FACTOR
static final float MIN_LOAD_FACTORMinimal sane load factor (99 empty slots per 100).- See Also:
-
MAX_LOAD_FACTOR
static final float MAX_LOAD_FACTORMaximum sane load factor (1 empty slot per 100).- See Also:
-
MIN_HASH_ARRAY_LENGTH
static final int MIN_HASH_ARRAY_LENGTHMinimum hash buffer size.- See Also:
-
MAX_HASH_ARRAY_LENGTH
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:
-
ITERATION_SEED
-
-
Constructor Details
-
HashContainers
HashContainers()
-
-
Method Details
-
iterationIncrement
static int iterationIncrement(int seed) -
nextBufferSize
static int nextBufferSize(int arraySize, int elements, double loadFactor) -
expandAtCount
static int expandAtCount(int arraySize, double loadFactor) -
checkPowerOfTwo
static boolean checkPowerOfTwo(int arraySize) -
minBufferSize
static int minBufferSize(int elements, double loadFactor) -
checkLoadFactor
static void checkLoadFactor(double loadFactor, double minAllowedInclusive, double maxAllowedInclusive)
-