Tabnine Logo
IntSet.hash3
Code IndexAdd Tabnine to your IDE (free)

How to use
hash3
method
in
com.badlogic.gdx.utils.IntSet

Best Java code snippets using com.badlogic.gdx.utils.IntSet.hash3 (Showing top 15 results out of 315)

origin: libgdx/libgdx

public boolean contains (int key) {
  if (key == 0) return hasZeroValue;
  int index = key & mask;
  if (keyTable[index] != key) {
    index = hash2(key);
    if (keyTable[index] != key) {
      index = hash3(key);
      if (keyTable[index] != key) return containsKeyStash(key);
    }
  }
  return true;
}
origin: libgdx/libgdx

public boolean contains (int key) {
  if (key == 0) return hasZeroValue;
  int index = key & mask;
  if (keyTable[index] != key) {
    index = hash2(key);
    if (keyTable[index] != key) {
      index = hash3(key);
      if (keyTable[index] != key) return containsKeyStash(key);
    }
  }
  return true;
}
origin: libgdx/libgdx

/** Returns true if the key was removed. */
public boolean remove (int key) {
  if (key == 0) {
    if (!hasZeroValue) return false;
    hasZeroValue = false;
    size--;
    return true;
  }
  int index = key & mask;
  if (keyTable[index] == key) {
    keyTable[index] = EMPTY;
    size--;
    return true;
  }
  index = hash2(key);
  if (keyTable[index] == key) {
    keyTable[index] = EMPTY;
    size--;
    return true;
  }
  index = hash3(key);
  if (keyTable[index] == key) {
    keyTable[index] = EMPTY;
    size--;
    return true;
  }
  return removeStash(key);
}
origin: libgdx/libgdx

/** Returns true if the key was removed. */
public boolean remove (int key) {
  if (key == 0) {
    if (!hasZeroValue) return false;
    hasZeroValue = false;
    size--;
    return true;
  }
  int index = key & mask;
  if (keyTable[index] == key) {
    keyTable[index] = EMPTY;
    size--;
    return true;
  }
  index = hash2(key);
  if (keyTable[index] == key) {
    keyTable[index] = EMPTY;
    size--;
    return true;
  }
  index = hash3(key);
  if (keyTable[index] == key) {
    keyTable[index] = EMPTY;
    size--;
    return true;
  }
  return removeStash(key);
}
origin: libgdx/libgdx

/** Skips checks for existing keys. */
private void addResize (int key) {
  if (key == 0) {
    hasZeroValue = true;
    return;
  }
  // Check for empty buckets.
  int index1 = key & mask;
  int key1 = keyTable[index1];
  if (key1 == EMPTY) {
    keyTable[index1] = key;
    if (size++ >= threshold) resize(capacity << 1);
    return;
  }
  int index2 = hash2(key);
  int key2 = keyTable[index2];
  if (key2 == EMPTY) {
    keyTable[index2] = key;
    if (size++ >= threshold) resize(capacity << 1);
    return;
  }
  int index3 = hash3(key);
  int key3 = keyTable[index3];
  if (key3 == EMPTY) {
    keyTable[index3] = key;
    if (size++ >= threshold) resize(capacity << 1);
    return;
  }
  push(key, index1, key1, index2, key2, index3, key3);
}
origin: libgdx/libgdx

/** Skips checks for existing keys. */
private void addResize (int key) {
  if (key == 0) {
    hasZeroValue = true;
    return;
  }
  // Check for empty buckets.
  int index1 = key & mask;
  int key1 = keyTable[index1];
  if (key1 == EMPTY) {
    keyTable[index1] = key;
    if (size++ >= threshold) resize(capacity << 1);
    return;
  }
  int index2 = hash2(key);
  int key2 = keyTable[index2];
  if (key2 == EMPTY) {
    keyTable[index2] = key;
    if (size++ >= threshold) resize(capacity << 1);
    return;
  }
  int index3 = hash3(key);
  int key3 = keyTable[index3];
  if (key3 == EMPTY) {
    keyTable[index3] = key;
    if (size++ >= threshold) resize(capacity << 1);
    return;
  }
  push(key, index1, key1, index2, key2, index3, key3);
}
origin: libgdx/libgdx

if (key2 == key) return false;
int index3 = hash3(key);
int key3 = keyTable[index3];
if (key3 == key) return false;
origin: libgdx/libgdx

if (key2 == key) return false;
int index3 = hash3(key);
int key3 = keyTable[index3];
if (key3 == key) return false;
origin: libgdx/libgdx

index3 = hash3(evictedKey);
key3 = keyTable[index3];
if (key3 == EMPTY) {
origin: libgdx/libgdx

index3 = hash3(evictedKey);
key3 = keyTable[index3];
if (key3 == EMPTY) {
origin: com.badlogicgames.gdx/gdx

public boolean contains (int key) {
  if (key == 0) return hasZeroValue;
  int index = key & mask;
  if (keyTable[index] != key) {
    index = hash2(key);
    if (keyTable[index] != key) {
      index = hash3(key);
      if (keyTable[index] != key) return containsKeyStash(key);
    }
  }
  return true;
}
origin: com.badlogicgames.gdx/gdx

/** Returns true if the key was removed. */
public boolean remove (int key) {
  if (key == 0) {
    if (!hasZeroValue) return false;
    hasZeroValue = false;
    size--;
    return true;
  }
  int index = key & mask;
  if (keyTable[index] == key) {
    keyTable[index] = EMPTY;
    size--;
    return true;
  }
  index = hash2(key);
  if (keyTable[index] == key) {
    keyTable[index] = EMPTY;
    size--;
    return true;
  }
  index = hash3(key);
  if (keyTable[index] == key) {
    keyTable[index] = EMPTY;
    size--;
    return true;
  }
  return removeStash(key);
}
origin: com.badlogicgames.gdx/gdx

/** Skips checks for existing keys. */
private void addResize (int key) {
  if (key == 0) {
    hasZeroValue = true;
    return;
  }
  // Check for empty buckets.
  int index1 = key & mask;
  int key1 = keyTable[index1];
  if (key1 == EMPTY) {
    keyTable[index1] = key;
    if (size++ >= threshold) resize(capacity << 1);
    return;
  }
  int index2 = hash2(key);
  int key2 = keyTable[index2];
  if (key2 == EMPTY) {
    keyTable[index2] = key;
    if (size++ >= threshold) resize(capacity << 1);
    return;
  }
  int index3 = hash3(key);
  int key3 = keyTable[index3];
  if (key3 == EMPTY) {
    keyTable[index3] = key;
    if (size++ >= threshold) resize(capacity << 1);
    return;
  }
  push(key, index1, key1, index2, key2, index3, key3);
}
origin: com.badlogicgames.gdx/gdx

if (key2 == key) return false;
int index3 = hash3(key);
int key3 = keyTable[index3];
if (key3 == key) return false;
origin: com.badlogicgames.gdx/gdx

index3 = hash3(evictedKey);
key3 = keyTable[index3];
if (key3 == EMPTY) {
com.badlogic.gdx.utilsIntSethash3

Popular methods of IntSet

  • add
    Returns true if the key was not already in the set.
  • contains
  • iterator
    Returns an iterator for the keys in the set. Remove is supported. Note that the same iterator instan
  • remove
    Returns true if the key was removed.
  • <init>
    Creates a new set identical to the specified set.
  • addAll
  • addResize
    Skips checks for existing keys.
  • addStash
  • clear
    Clears the set and reduces the size of the backing arrays to be the specified capacity if they are l
  • containsKeyStash
  • ensureCapacity
    Increases the size of the backing array to accommodate the specified number of additional items. Use
  • hash2
  • ensureCapacity,
  • hash2,
  • push,
  • removeStash,
  • removeStashIndex,
  • resize

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Collectors (java.util.stream)
  • JList (javax.swing)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now