Tabnine Logo
ObjectBigList
Code IndexAdd Tabnine to your IDE (free)

How to use
ObjectBigList
in
it.unimi.dsi.fastutil.objects

Best Java code snippets using it.unimi.dsi.fastutil.objects.ObjectBigList (Showing top 20 results out of 315)

origin: it.unimi.dsi/fastutil

@Override
public K get(final long i) {
  return list.get(i);
}
@Override
origin: it.unimi.dsi/fastutil

@Override
public void add(final long i, final K k) {
  synchronized (sync) {
    list.add(i, k);
  }
}
@Override
origin: it.unimi.dsi/fastutil

/**
 * Shuffles the specified big list using the specified pseudorandom number
 * generator.
 *
 * @param l
 *            the big list to be shuffled.
 * @param random
 *            a pseudorandom number generator.
 * @return {@code l}.
 */
public static <K> ObjectBigList<K> shuffle(final ObjectBigList<K> l, final Random random) {
  for (long i = l.size64(); i-- != 0;) {
    final long p = (random.nextLong() & 0x7FFFFFFFFFFFFFFFL) % (i + 1);
    final K t = l.get(i);
    l.set(i, l.get(p));
    l.set(p, t);
  }
  return l;
}
/**
origin: it.unimi.dsi/fastutil

/**
 * Creates a new big-array big list and fills it with a given type-specific
 * list.
 *
 * @param l
 *            a type-specific list that will be used to fill the array list.
 */
public ObjectBigArrayBigList(final ObjectBigList<? extends K> l) {
  this(l.size64());
  l.getElements(0, a, 0, size = l.size64());
}
/**
origin: it.unimi.dsi/dsiutils

/** Creates a new shift-add-xor signed string map using a given hash map.
 *
 * @param function a function mapping each string in <code>list</code> to its ordinal position.
 * @param list a list of strings.
 */
public LiterallySignedStringMap(final Object2LongFunction<? extends CharSequence> function, final ObjectBigList<? extends MutableString> list) {
  this.function = function;
  this.list = list;
  size = list.size64();
  for(long i = 0; i < size; i++) if (function.getLong(list.get(i)) != i) throw new IllegalArgumentException("Function and list do not agree");
  defRetValue = -1;
}
origin: uk.ac.gate.mimir/mimir-core

 if(directTermId == directTermIds.defaultReturnValue()) {
  directTerms.add(termString);
  directTermId = directTerms.size64() -1;
  directTermIds.put(termString, directTermId);
for(long directTermId = 0; directTermId < directTerms.size64(); directTermId++){
 String termString = directTerms.get(directTermId);
 termMS.replace(termString);
 PostingsList termPostings = termMap.get(termMS);
    IOFactory.FILESYSTEM_FACTORY,
    mg4jBasename, 
    directTerms.size64(),
    Fast.mostSignificantBit(QuasiSuccinctIndex.DEFAULT_QUANTUM),
    QuasiSuccinctIndexWriter.DEFAULT_CACHE_SIZE,
int maxTermSize = -1; // -1 means unknown
for(long directTermId = 0; directTermId < directTerms.size64(); directTermId++){
 String termString = directTerms.get(directTermId);
 termMS.replace(termString);
 PostingsList termPostings = termMap.get(termMS);
origin: it.unimi.dsi/fastutil

@Override
public long size64() {
  return list.size64();
}
@Override
origin: it.unimi.dsi/fastutil

@Override
public K set(final long i, final K k) {
  synchronized (sync) {
    return list.set(i, k);
  }
}
@Override
origin: it.unimi.dsi/fastutil

@Override
public void addElements(long index, final K a[][]) {
  synchronized (sync) {
    list.addElements(index, a);
  }
}
/*
origin: it.unimi.dsi/fastutil

@Override
public boolean addAll(final long index, final Collection<? extends K> c) {
  synchronized (sync) {
    return list.addAll(index, c);
  }
}
@Override
origin: it.unimi.dsi/fastutil

private boolean assertRange() {
  assert from <= l.size64();
  assert to <= l.size64();
  assert to >= from;
  return true;
}
@Override
origin: it.unimi.dsi/fastutil

@Override
public K set(long index, K k) {
  ensureRestrictedIndex(index);
  return l.set(from + index, k);
}
@Override
origin: it.unimi.dsi/fastutil

@Override
public void addElements(long index, final K a[][], long offset, long length) {
  synchronized (sync) {
    list.addElements(index, a, offset, length);
  }
}
@Override
origin: it.unimi.dsi/fastutil

@Override
public boolean addAll(final long index, final Collection<? extends K> c) {
  ensureIndex(index);
  to += c.size();
  return l.addAll(from + index, c);
}
@Override
origin: it.unimi.dsi/fastutil

@Override
public K get(final long i) {
  synchronized (sync) {
    return list.get(i);
  }
}
@Override
origin: it.unimi.dsi/fastutil

@Override
public boolean add(final K k) {
  l.add(to, k);
  to++;
  assert assertRange();
  return true;
}
@Override
origin: it.unimi.dsi/fastutil

@Override
public long size64() {
  synchronized (sync) {
    return list.size64();
  }
}
@Override
origin: uk.ac.gate.mimir/mimir-core

  aHit = queryExecutor.nextHit();
 documentHits.set(docIndex, hits);
} else {
origin: it.unimi.dsi/fastutil

@Override
public void addElements(final long index, final K a[][], long offset, long length) {
  ensureIndex(index);
  l.addElements(this.from + index, a, offset, length);
  this.to += length;
  assert assertRange();
}
@Override
origin: uk.ac.gate.mimir/mimir-core

/**
 * Gets the term string for a given direct term ID. The term ID must have been 
 * obtained from the direct index of this index.
 * @param termId the ID for the term being sought.
 * @return the string for the given term.
 */
public CharSequence getDirectTerm(long termId) {
 return directTerms.get(termId);
}

it.unimi.dsi.fastutil.objectsObjectBigList

Javadoc

A type-specific BigList; provides some additional methods that use polymorphism to avoid (un)boxing.

Additionally, this interface strengthens #iterator(), #listIterator(), #listIterator(long) and #subList(long,long).

Besides polymorphic methods, this interfaces specifies methods to copy into an array or remove contiguous sublists. Although the abstract implementation of this interface provides simple, one-by-one implementations of these methods, it is expected that concrete implementation override them with optimized versions.

Most used methods

  • get
  • add
  • size64
  • set
  • addAll
  • addElements
    Add (hopefully quickly) elements to this type-specific big list.
  • compareTo
  • getElements
    Copies (hopefully quickly) elements of this type-specific big list into the given big array.
  • indexOf
  • lastIndexOf
  • listIterator
  • remove
  • listIterator,
  • remove,
  • removeElements,
  • size,
  • subList

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Kernel (java.awt.image)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Best plugins for Eclipse
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