public final class HashMapHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
arraySize(int expected,
float f)
Returns the least power of two smaller than or equal to 230 and larger than or equal to
Math.ceil( expected / f ). |
static long |
nextPowerOfTwo(long length)
Return the least power of two greater than or equal to the specified value.
|
static int |
phiMix(int x) |
public static int arraySize(int expected,
float f)
Math.ceil( expected / f ).expected - the expected number of elements in a hash table.f - the load factor.IllegalArgumentException - if the necessary size is larger than 230.public static long nextPowerOfTwo(long length)
Note that this function will return 1 when the argument is 0.
length - a long integer smaller than or equal to 262.public static int phiMix(int x)
Copyright © 2020 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.