/** * Removes the element at the given position of the table shifting, if * necessary, other elements so that all elements can be found by linear * probing. * * @param d * the array of the elements * @param pos * the position of data at which to delete the element */ static <E> void remove(E[] d, int pos) { for (;;) { int next = getMovedPosition(d, pos); E moved = d[pos] = d[next]; if (moved == null) return; // else pos = next; } }
/** * Removes the element at the given position of the table shifting, if * necessary, other elements so that all elements can be found by linear * probing. * * @param d * the array of the elements * @param pos * the position of data at which to delete the element */ static <E> void remove(E[] d, int pos) { for (;;) { int next = getMovedPosition(d, pos); E moved = d[pos] = d[next]; if (moved == null) return; // else pos = next; } }
/** * Removes the element at the given position of the table shifting, if * necessary, other elements so that all elements can be found by linear * probing. * * @param d * the array of the elements * @param pos * the position of data at which to delete the element */ static <E> void remove(E[] d, int pos) { for (;;) { int next = getMovedPosition(d, pos); E moved = d[pos] = d[next]; if (moved == null) return; // else pos = next; } }
/** * Removes the element at the given position of the table and the * corresponding value at the same position, shifting, if necessary, other * elements and values so that all elements can be found by linear probing. * * @param d * the array of the elements * @param pos * the position of data at which to delete the element */ static <K, V> void remove(K[] k, V[] v, int pos) { for (;;) { int next = getMovedPosition(k, pos); K moved = k[pos] = k[next]; v[pos] = v[next]; if (moved == null) return; // else pos = next; } }
/** * Removes the element at the given position of the table and the * corresponding value at the same position, shifting, if necessary, other * elements and values so that all elements can be found by linear probing. * * @param d * the array of the elements * @param pos * the position of data at which to delete the element */ static <K, V> void remove(K[] k, V[] v, int pos) { for (;;) { int next = getMovedPosition(k, pos); K moved = k[pos] = k[next]; v[pos] = v[next]; if (moved == null) return; // else pos = next; } }
/** * Removes the element at the given position of the table and the * corresponding value at the same position, shifting, if necessary, other * elements and values so that all elements can be found by linear probing. * * @param d * the array of the elements * @param pos * the position of data at which to delete the element */ static <K, V> void remove(K[] k, V[] v, int pos) { for (;;) { int next = getMovedPosition(k, pos); K moved = k[pos] = k[next]; v[pos] = v[next]; if (moved == null) return; // else pos = next; } }
private static <E> void remove(byte sl, E[] data, int[] masks, int pos) { int oldFragment = getFragment(sl, masks, pos); for (;;) { int next = LinearProbing.getMovedPosition(data, pos); E moved = data[pos] = data[next]; int newFragment = getFragment(sl, masks, next); changeFragment(sl, masks, pos, oldFragment ^ newFragment); if (moved == null) return; // else pos = next; oldFragment = newFragment; } }
private static <E> void remove(byte sl, E[] data, int[] masks, int pos) { int oldFragment = getFragment(sl, masks, pos); for (;;) { int next = LinearProbing.getMovedPosition(data, pos); E moved = data[pos] = data[next]; int newFragment = getFragment(sl, masks, next); changeFragment(sl, masks, pos, oldFragment ^ newFragment); if (moved == null) return; // else pos = next; oldFragment = newFragment; } }
private static <E> void remove(byte sl, E[] data, int[] masks, int pos) { int oldFragment = getFragment(sl, masks, pos); for (;;) { int next = LinearProbing.getMovedPosition(data, pos); E moved = data[pos] = data[next]; int newFragment = getFragment(sl, masks, next); changeFragment(sl, masks, pos, oldFragment ^ newFragment); if (moved == null) return; // else pos = next; oldFragment = newFragment; } }