| java.lang.Object uk.org.ponder.intutil.IntEHInnaBox
IntEHInnaBox | public class IntEHInnaBox (Code) | | The class IntEHInnaBox implements an extendible hash table of
ints to ints that lies in-memory, i.e. inna box. The key value must be hashed
externally. The array used for storage alternates between storing hash values
at even-numbered locations and the required value at odd-numbered ones. A
hash value of 0 is invalid, and represents an empty entry. a stored value of
-1 is invalid, and is returned if the item is not found.
If hash values are equal, the stored values are indistinguishable and so must
be indexes into some structure which can decide which one was actually
required. Otherwise, hash values should be truly unique, for example
StringVat indices. This is as good as can be done without callbacks such as
equals() and hashCode().
|
Method Summary | |
public int | get(int hash, int offset) | public static int | hash(int smallint) | public boolean | put(int hash, int value) |
INVALID_VALUE | final public static int INVALID_VALUE(Code) | | |
KNUTH_GOLDEN_CONSTANT | final public static int KNUTH_GOLDEN_CONSTANT(Code) | | |
current_bits | int current_bits(Code) | | |
current_mask | int current_mask(Code) | | |
IntEHInnaBox | public IntEHInnaBox()(Code) | | |
IntEHInnaBox | public IntEHInnaBox(int initialcapacity)(Code) | | |
get | public int get(int hash, int offset)(Code) | | |
hash | public static int hash(int smallint)(Code) | | |
put | public boolean put(int hash, int value)(Code) | | |
|
|