public static boolean hasItem(PipeHashTable ht, long key) { int mask = ht.mask; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = ht.keys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = ht.keys[++hash&mask]; } long value = ht.values[hash&mask]; return 0 != (value&((ht.lowerBounds-(1+value))>>63)); }
public static int getItem(LongHashTable ht, long key) { int mask = ht.mask; long[] localKeys = ht.keys; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = localKeys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = localKeys[++hash&mask]; } return ht.values[hash&mask]; }
public static boolean hasItem(LongHashSet ht, long key) { int mask = ht.mask; long[] localKeys = ht.keys; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = localKeys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = localKeys[++hash&mask]; } return 0 != keyAtIdx; }
public static boolean hasItem(LongHashTable ht, long key) { int mask = ht.mask; long[] localKeys = ht.keys; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = localKeys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = localKeys[++hash&mask]; } return 0 != keyAtIdx; }
public static boolean hasItem(PipeHashTable ht, long key) { int mask = ht.mask; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = ht.keys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = ht.keys[++hash&mask]; } long value = ht.values[hash&mask]; return 0 != (value&((ht.lowerBounds-(1+value))>>63)); }
public static long getItem(LongLongHashTable ht, long key) { int mask = ht.mask; long[] localKeys = ht.keys; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = localKeys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = localKeys[++hash&mask]; } return ht.values[hash&mask]; }
public static boolean replaceItem(LongLongHashTable ht, long key, int newValue) { int mask = ht.mask; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = ht.keys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = ht.keys[++hash&mask]; } if (0 == keyAtIdx) { //TODO: this seems wrong. return false; //do not set item if it holds a previous value. } ht.values[hash&mask] = newValue; return true; }
public static long getItem(LongLongHashTable ht, long key) { int mask = ht.mask; long[] localKeys = ht.keys; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = localKeys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = localKeys[++hash&mask]; } return ht.values[hash&mask]; }
public static boolean replaceItem(LongHashTable ht, long key, int newValue) { int mask = ht.mask; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = ht.keys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = ht.keys[++hash&mask]; } if (0 == keyAtIdx) { //TODO: this seems wrong. return false; //do not set item if it holds a previous value. } ht.values[hash&mask] = newValue; return true; }
public static boolean hasItem(LongHashTable ht, long key) { int mask = ht.mask; long[] localKeys = ht.keys; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = localKeys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = localKeys[++hash&mask]; } return 0 != keyAtIdx; }
public static int getItem(LongHashTable ht, long key) { int mask = ht.mask; long[] localKeys = ht.keys; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = localKeys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = localKeys[++hash&mask]; } return ht.values[hash&mask]; }
public static long getItem(LongLongHashTable ht, long key) { int mask = ht.mask; long[] localKeys = ht.keys; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = localKeys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = localKeys[++hash&mask]; } return ht.values[hash&mask]; }
public static boolean hasItem(LongHashTable ht, long key) { int mask = ht.mask; long[] localKeys = ht.keys; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = localKeys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = localKeys[++hash&mask]; } return 0 != keyAtIdx; }
public static boolean hasItem(LongHashSet ht, long key) { int mask = ht.mask; long[] localKeys = ht.keys; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = localKeys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = localKeys[++hash&mask]; } return 0 != keyAtIdx; }
public static int getItem(LongHashTable ht, long key) { int mask = ht.mask; long[] localKeys = ht.keys; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = localKeys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = localKeys[++hash&mask]; } return ht.values[hash&mask]; }
public static boolean hasItem(LongLongHashTable ht, long key) { int mask = ht.mask; long[] localKeys = ht.keys; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = localKeys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = localKeys[++hash&mask]; } return 0 != keyAtIdx; }
public static boolean hasItem(LongLongHashTable ht, long key) { int mask = ht.mask; long[] localKeys = ht.keys; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = localKeys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = localKeys[++hash&mask]; } return 0 != keyAtIdx; }
public static boolean hasItem(LongHashSet ht, long key) { int mask = ht.mask; long[] localKeys = ht.keys; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = localKeys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = localKeys[++hash&mask]; } return 0 != keyAtIdx; }
public static boolean hasItem(LongLongHashTable ht, long key) { int mask = ht.mask; long[] localKeys = ht.keys; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = localKeys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = localKeys[++hash&mask]; } return 0 != keyAtIdx; }
public static boolean replaceItem(LongLongHashTable ht, long key, int newValue) { int mask = ht.mask; int hash = MurmurHash.hash64finalizer(key); long keyAtIdx = ht.keys[hash&mask]; while (keyAtIdx != key && keyAtIdx != 0) { keyAtIdx = ht.keys[++hash&mask]; } if (0 == keyAtIdx) { //TODO: this seems wrong. return false; //do not set item if it holds a previous value. } ht.values[hash&mask] = newValue; return true; }