Codota Logo
LongLinkedOpenHashSet.shiftKeys
Code IndexAdd Codota to your IDE (free)

How to use
shiftKeys
method
in
it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet

Best Java code snippets using it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet.shiftKeys (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: it.unimi.dsi/fastutil

/**
 * Removes the first key in iteration order.
 * 
 * @return the first key.
 * @throws NoSuchElementException
 *             is this set is empty.
 */
public long removeFirstLong() {
  if (size == 0)
    throw new NoSuchElementException();
  final int pos = first;
  // Abbreviated version of fixPointers(pos)
  first = (int) link[pos];
  if (0 <= first) {
    // Special case of SET_PREV(link[first], -1)
    link[first] |= (-1 & 0xFFFFFFFFL) << 32;
  }
  final long k = key[pos];
  size--;
  if (((k) == (0))) {
    containsNull = false;
    key[n] = (0);
  } else
    shiftKeys(pos);
  if (n > minN && size < maxFill / 4 && n > DEFAULT_INITIAL_SIZE)
    rehash(n / 2);
  return k;
}
/**
origin: it.unimi.dsi/fastutil

/**
 * Removes the the last key in iteration order.
 * 
 * @return the last key.
 * @throws NoSuchElementException
 *             is this set is empty.
 */
public long removeLastLong() {
  if (size == 0)
    throw new NoSuchElementException();
  final int pos = last;
  // Abbreviated version of fixPointers(pos)
  last = (int) (link[pos] >>> 32);
  if (0 <= last) {
    // Special case of SET_NEXT(link[last], -1)
    link[last] |= -1 & 0xFFFFFFFFL;
  }
  final long k = key[pos];
  size--;
  if (((k) == (0))) {
    containsNull = false;
    key[n] = (0);
  } else
    shiftKeys(pos);
  if (n > minN && size < maxFill / 4 && n > DEFAULT_INITIAL_SIZE)
    rehash(n / 2);
  return k;
}
private void moveIndexToFirst(final int i) {
origin: it.unimi.dsi/fastutil

private boolean removeEntry(final int pos) {
  size--;
  fixPointers(pos);
  shiftKeys(pos);
  if (n > minN && size < maxFill / 4 && n > DEFAULT_INITIAL_SIZE)
    rehash(n / 2);
  return true;
}
private boolean removeNullEntry() {
it.unimi.dsi.fastutil.longsLongLinkedOpenHashSetshiftKeys

Javadoc

Shifts left entries with the specified hash code, starting at the specified position, and empties the resulting free entry.

Popular methods of LongLinkedOpenHashSet

  • size
  • <init>
    Creates a new hash set and fills it with the elements of a given array.
  • add
  • clear
  • iterator
    Returns a type-specific list iterator on the elements in this set, starting from a given element of
  • addAll
  • addAndMoveToFirst
    Adds a key to the set; if the key is already present, it is moved to the first position of the itera
  • contains
  • ensureCapacity
  • firstLong
    Returns the first element of this set in iteration order.
  • fixPointers
    Modifies the #link vector for a shift from s to d. This method will complete in constant time.
  • moveIndexToFirst
  • fixPointers,
  • moveIndexToFirst,
  • moveIndexToLast,
  • realSize,
  • rehash,
  • remove,
  • removeEntry,
  • removeNullEntry,
  • retainAll

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now