/* */ protected void rehash(int newN) /* */ { /* 729 */ int i = 0; /* 730 */ boolean[] used = this.used; /* */ /* 732 */ long[] key = this.key; /* 733 */ byte[] value = this.value; /* 734 */ int newMask = newN - 1; /* 735 */ long[] newKey = new long[newN]; /* 736 */ byte[] newValue = new byte[newN]; /* 737 */ boolean[] newUsed = new boolean[newN]; /* 738 */ for (int j = this.size; j-- != 0; ) { /* 739 */ while (used[i] == 0) i++; /* 740 */ long k = key[i]; /* 741 */ int pos = (int)HashCommon.murmurHash3(k) & newMask; /* 742 */ while (newUsed[pos] != 0) pos = pos + 1 & newMask; /* 743 */ newUsed[pos] = true; /* 744 */ newKey[pos] = k; /* 745 */ newValue[pos] = value[i]; /* 746 */ i++; /* */ } /* 748 */ this.n = newN; /* 749 */ this.mask = newMask; /* 750 */ this.maxFill = HashCommon.maxFill(this.n, this.f); /* 751 */ this.key = newKey; /* 752 */ this.value = newValue; /* 753 */ this.used = newUsed; /* */ }
/* */ protected void rehash(int newN) /* */ { /* 736 */ int i = 0; /* 737 */ boolean[] used = this.used; /* */ /* 739 */ Object[] key = this.key; /* 740 */ double[] value = this.value; /* 741 */ int newMask = newN - 1; /* 742 */ Object[] newKey = (Object[])new Object[newN]; /* 743 */ double[] newValue = new double[newN]; /* 744 */ boolean[] newUsed = new boolean[newN]; /* 745 */ for (int j = this.size; j-- != 0; ) { /* 746 */ while (used[i] == 0) i++; /* 747 */ Object k = key[i]; /* 748 */ int pos = HashCommon.murmurHash3(this.strategy.hashCode(k)) & newMask; /* 749 */ while (newUsed[pos] != 0) pos = pos + 1 & newMask; /* 750 */ newUsed[pos] = true; /* 751 */ newKey[pos] = k; /* 752 */ newValue[pos] = value[i]; /* 753 */ i++; /* */ } /* 755 */ this.n = newN; /* 756 */ this.mask = newMask; /* 757 */ this.maxFill = HashCommon.maxFill(this.n, this.f); /* 758 */ this.key = newKey; /* 759 */ this.value = newValue; /* 760 */ this.used = newUsed; /* */ }
/* */ protected void rehash(int newN) /* */ { /* 716 */ int i = 0; /* 717 */ boolean[] used = this.used; /* */ /* 719 */ Object[] key = this.key; /* 720 */ int[] value = this.value; /* 721 */ int newMask = newN - 1; /* 722 */ Object[] newKey = (Object[])new Object[newN]; /* 723 */ int[] newValue = new int[newN]; /* 724 */ boolean[] newUsed = new boolean[newN]; /* 725 */ for (int j = this.size; j-- != 0; ) { /* 726 */ while (used[i] == 0) i++; /* 727 */ Object k = key[i]; /* 728 */ int pos = (k == null ? 142593372 : HashCommon.murmurHash3(System.identityHashCode(k))) & newMask; /* 729 */ while (newUsed[pos] != 0) pos = pos + 1 & newMask; /* 730 */ newUsed[pos] = true; /* 731 */ newKey[pos] = k; /* 732 */ newValue[pos] = value[i]; /* 733 */ i++; /* */ } /* 735 */ this.n = newN; /* 736 */ this.mask = newMask; /* 737 */ this.maxFill = HashCommon.maxFill(this.n, this.f); /* 738 */ this.key = newKey; /* 739 */ this.value = newValue; /* 740 */ this.used = newUsed; /* */ }
/* */ public Long2ByteOpenHashMap(int expected, float f) /* */ { /* 107 */ if ((f <= 0.0F) || (f > 1.0F)) throw new IllegalArgumentException("Load factor must be greater than 0 and smaller than or equal to 1"); /* 108 */ if (expected < 0) throw new IllegalArgumentException("The expected number of elements must be nonnegative"); /* 109 */ this.f = f; /* 110 */ this.n = HashCommon.arraySize(expected, f); /* 111 */ this.mask = (this.n - 1); /* 112 */ this.maxFill = HashCommon.maxFill(this.n, f); /* 113 */ this.key = new long[this.n]; /* 114 */ this.value = new byte[this.n]; /* 115 */ this.used = new boolean[this.n]; /* */ }
/* */ public Object2DoubleOpenCustomHashMap(int expected, float f, Hash.Strategy<K> strategy) /* */ { /* 110 */ this.strategy = strategy; /* 111 */ if ((f <= 0.0F) || (f > 1.0F)) throw new IllegalArgumentException("Load factor must be greater than 0 and smaller than or equal to 1"); /* 112 */ if (expected < 0) throw new IllegalArgumentException("The expected number of elements must be nonnegative"); /* 113 */ this.f = f; /* 114 */ this.n = HashCommon.arraySize(expected, f); /* 115 */ this.mask = (this.n - 1); /* 116 */ this.maxFill = HashCommon.maxFill(this.n, f); /* 117 */ this.key = ((Object[])new Object[this.n]); /* 118 */ this.value = new double[this.n]; /* 119 */ this.used = new boolean[this.n]; /* */ }
/* */ public Float2CharLinkedOpenHashMap(int expected, float f) /* */ { /* 151 */ if ((f <= 0.0F) || (f > 1.0F)) throw new IllegalArgumentException("Load factor must be greater than 0 and smaller than or equal to 1"); /* 152 */ if (expected < 0) throw new IllegalArgumentException("The expected number of elements must be nonnegative"); /* 153 */ this.f = f; /* 154 */ this.n = HashCommon.arraySize(expected, f); /* 155 */ this.mask = (this.n - 1); /* 156 */ this.maxFill = HashCommon.maxFill(this.n, f); /* 157 */ this.key = new float[this.n]; /* 158 */ this.value = new char[this.n]; /* 159 */ this.used = new boolean[this.n]; /* 160 */ this.link = new long[this.n]; /* */ }
/* */ protected void rehash(int newN) /* */ { /* 1154 */ int i = this.first; int prev = -1; int newPrev = -1; /* */ /* 1156 */ float[] key = this.key; /* 1157 */ char[] value = this.value; /* 1158 */ int newMask = newN - 1; /* 1159 */ float[] newKey = new float[newN]; /* 1160 */ char[] newValue = new char[newN]; /* 1161 */ boolean[] newUsed = new boolean[newN]; /* 1162 */ long[] link = this.link; /* 1163 */ long[] newLink = new long[newN]; /* 1164 */ this.first = -1; /* 1165 */ for (int j = this.size; j-- != 0; ) { /* 1166 */ float k = key[i]; /* 1167 */ int pos = HashCommon.murmurHash3(HashCommon.float2int(k)) & newMask; /* 1168 */ while (newUsed[pos] != 0) pos = pos + 1 & newMask; /* 1169 */ newUsed[pos] = true; /* 1170 */ newKey[pos] = k; /* 1171 */ newValue[pos] = value[i]; /* 1172 */ if (prev != -1) { /* 1173 */ newLink[newPrev] ^= (newLink[newPrev] ^ pos & 0xFFFFFFFF) & 0xFFFFFFFF; /* 1174 */ newLink[pos] ^= (newLink[pos] ^ (newPrev & 0xFFFFFFFF) << 32) & 0x0; /* 1175 */ newPrev = pos; /* */ } /* */ else { /* 1178 */ newPrev = this.first = pos; /* */ /* 1180 */ newLink[pos] = -1L; /* */ } /* 1182 */ int t = i; /* 1183 */ i = (int)link[i]; /* 1184 */ prev = t; /* */ } /* 1186 */ this.n = newN; /* 1187 */ this.mask = newMask; /* 1188 */ this.maxFill = HashCommon.maxFill(this.n, this.f); /* 1189 */ this.key = newKey; /* 1190 */ this.value = newValue; /* 1191 */ this.used = newUsed; /* 1192 */ this.link = newLink; /* 1193 */ this.last = newPrev; /* 1194 */ if (newPrev != -1) /* */ { /* 1196 */ newLink[newPrev] |= 4294967295L; /* */ } /* */ }
/* */ protected void rehash(int newN) /* */ { /* 1194 */ int i = this.first; int prev = -1; int newPrev = -1; /* */ /* 1196 */ long[] key = this.key; /* 1197 */ short[] value = this.value; /* 1198 */ int newMask = newN - 1; /* 1199 */ long[] newKey = new long[newN]; /* 1200 */ short[] newValue = new short[newN]; /* 1201 */ boolean[] newUsed = new boolean[newN]; /* 1202 */ long[] link = this.link; /* 1203 */ long[] newLink = new long[newN]; /* 1204 */ this.first = -1; /* 1205 */ for (int j = this.size; j-- != 0; ) { /* 1206 */ long k = key[i]; /* 1207 */ int pos = (int)HashCommon.murmurHash3(k) & newMask; /* 1208 */ while (newUsed[pos] != 0) pos = pos + 1 & newMask; /* 1209 */ newUsed[pos] = true; /* 1210 */ newKey[pos] = k; /* 1211 */ newValue[pos] = value[i]; /* 1212 */ if (prev != -1) { /* 1213 */ newLink[newPrev] ^= (newLink[newPrev] ^ pos & 0xFFFFFFFF) & 0xFFFFFFFF; /* 1214 */ newLink[pos] ^= (newLink[pos] ^ (newPrev & 0xFFFFFFFF) << 32) & 0x0; /* 1215 */ newPrev = pos; /* */ } /* */ else { /* 1218 */ newPrev = this.first = pos; /* */ /* 1220 */ newLink[pos] = -1L; /* */ } /* 1222 */ int t = i; /* 1223 */ i = (int)link[i]; /* 1224 */ prev = t; /* */ } /* 1226 */ this.n = newN; /* 1227 */ this.mask = newMask; /* 1228 */ this.maxFill = HashCommon.maxFill(this.n, this.f); /* 1229 */ this.key = newKey; /* 1230 */ this.value = newValue; /* 1231 */ this.used = newUsed; /* 1232 */ this.link = newLink; /* 1233 */ this.last = newPrev; /* 1234 */ if (newPrev != -1) /* */ { /* 1236 */ newLink[newPrev] |= 4294967295L; /* */ } /* */ }
/* */ private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { /* 821 */ s.defaultReadObject(); /* 822 */ this.n = HashCommon.arraySize(this.size, this.f); /* 823 */ this.maxFill = HashCommon.maxFill(this.n, this.f); /* 824 */ this.mask = (this.n - 1); /* 825 */ Object[] key = this.key = (Object[])new Object[this.n]; /* 826 */ double[] value = this.value = new double[this.n]; /* 827 */ boolean[] used = this.used = new boolean[this.n]; /* */ /* 830 */ int i = this.size; for (int pos = 0; i-- != 0; ) { /* 831 */ Object k = s.readObject(); /* 832 */ double v = s.readDouble(); /* 833 */ pos = HashCommon.murmurHash3(this.strategy.hashCode(k)) & this.mask; /* 834 */ while (used[pos] != 0) pos = pos + 1 & this.mask; /* 835 */ used[pos] = true; /* 836 */ key[pos] = k; /* 837 */ value[pos] = v; /* */ } /* */ }
/* */ private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { /* 812 */ s.defaultReadObject(); /* 813 */ this.n = HashCommon.arraySize(this.size, this.f); /* 814 */ this.maxFill = HashCommon.maxFill(this.n, this.f); /* 815 */ this.mask = (this.n - 1); /* 816 */ long[] key = this.key = new long[this.n]; /* 817 */ byte[] value = this.value = new byte[this.n]; /* 818 */ boolean[] used = this.used = new boolean[this.n]; /* */ /* 821 */ int i = this.size; for (int pos = 0; i-- != 0; ) { /* 822 */ long k = s.readLong(); /* 823 */ byte v = s.readByte(); /* 824 */ pos = (int)HashCommon.murmurHash3(k) & this.mask; /* 825 */ while (used[pos] != 0) pos = pos + 1 & this.mask; /* 826 */ used[pos] = true; /* 827 */ key[pos] = k; /* 828 */ value[pos] = v; /* */ } /* */ }
/* */ private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { /* 800 */ s.defaultReadObject(); /* 801 */ this.n = HashCommon.arraySize(this.size, this.f); /* 802 */ this.maxFill = HashCommon.maxFill(this.n, this.f); /* 803 */ this.mask = (this.n - 1); /* 804 */ Object[] key = this.key = (Object[])new Object[this.n]; /* 805 */ int[] value = this.value = new int[this.n]; /* 806 */ boolean[] used = this.used = new boolean[this.n]; /* */ /* 809 */ int i = this.size; for (int pos = 0; i-- != 0; ) { /* 810 */ Object k = s.readObject(); /* 811 */ int v = s.readInt(); /* 812 */ pos = (k == null ? 142593372 : HashCommon.murmurHash3(System.identityHashCode(k))) & this.mask; /* 813 */ while (used[pos] != 0) pos = pos + 1 & this.mask; /* 814 */ used[pos] = true; /* 815 */ key[pos] = k; /* 816 */ value[pos] = v; /* */ } /* */ }
/* */ private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { /* 1256 */ s.defaultReadObject(); /* 1257 */ this.n = HashCommon.arraySize(this.size, this.f); /* 1258 */ this.maxFill = HashCommon.maxFill(this.n, this.f); /* 1259 */ this.mask = (this.n - 1); /* 1260 */ float[] key = this.key = new float[this.n]; /* 1261 */ char[] value = this.value = new char[this.n]; /* 1262 */ boolean[] used = this.used = new boolean[this.n]; /* 1263 */ long[] link = this.link = new long[this.n]; /* 1264 */ int prev = -1; /* 1265 */ this.first = (this.last = -1); /* */ /* 1268 */ int i = this.size; for (int pos = 0; i-- != 0; ) { /* 1269 */ float k = s.readFloat(); /* 1270 */ char v = s.readChar(); /* 1271 */ pos = HashCommon.murmurHash3(HashCommon.float2int(k)) & this.mask; /* 1272 */ while (used[pos] != 0) pos = pos + 1 & this.mask; /* 1273 */ used[pos] = true; /* 1274 */ key[pos] = k; /* 1275 */ value[pos] = v; /* 1276 */ if (this.first != -1) { /* 1277 */ link[prev] ^= (link[prev] ^ pos & 0xFFFFFFFF) & 0xFFFFFFFF; /* 1278 */ link[pos] ^= (link[pos] ^ (prev & 0xFFFFFFFF) << 32) & 0x0; /* 1279 */ prev = pos; /* */ } /* */ else { /* 1282 */ prev = this.first = pos; /* */ /* 1284 */ link[pos] |= -4294967296L; /* */ } /* */ } /* 1287 */ this.last = prev; /* 1288 */ if (prev != -1) /* */ { /* 1290 */ link[prev] |= 4294967295L; /* */ } /* */ }
/* */ private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { /* 1296 */ s.defaultReadObject(); /* 1297 */ this.n = HashCommon.arraySize(this.size, this.f); /* 1298 */ this.maxFill = HashCommon.maxFill(this.n, this.f); /* 1299 */ this.mask = (this.n - 1); /* 1300 */ long[] key = this.key = new long[this.n]; /* 1301 */ short[] value = this.value = new short[this.n]; /* 1302 */ boolean[] used = this.used = new boolean[this.n]; /* 1303 */ long[] link = this.link = new long[this.n]; /* 1304 */ int prev = -1; /* 1305 */ this.first = (this.last = -1); /* */ /* 1308 */ int i = this.size; for (int pos = 0; i-- != 0; ) { /* 1309 */ long k = s.readLong(); /* 1310 */ short v = s.readShort(); /* 1311 */ pos = (int)HashCommon.murmurHash3(k) & this.mask; /* 1312 */ while (used[pos] != 0) pos = pos + 1 & this.mask; /* 1313 */ used[pos] = true; /* 1314 */ key[pos] = k; /* 1315 */ value[pos] = v; /* 1316 */ if (this.first != -1) { /* 1317 */ link[prev] ^= (link[prev] ^ pos & 0xFFFFFFFF) & 0xFFFFFFFF; /* 1318 */ link[pos] ^= (link[pos] ^ (prev & 0xFFFFFFFF) << 32) & 0x0; /* 1319 */ prev = pos; /* */ } /* */ else { /* 1322 */ prev = this.first = pos; /* */ /* 1324 */ link[pos] |= -4294967296L; /* */ } /* */ } /* 1327 */ this.last = prev; /* 1328 */ if (prev != -1) /* */ { /* 1330 */ link[prev] |= 4294967295L; /* */ } /* */ }