Codota Logo
Object2IntMaps
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: org.dkpro.argumentation/dkpro-argumentation-fastutil

/**
 * @return An unmodifiable view of the reverse-lookup index map for the elements of
 *         {@link #getDecorated() the decorated <code>List</code>}.
 */
public Object2IntMap<E> getReverseLookupMap()
{
  return Object2IntMaps.unmodifiable(reverseLookupMap);
}
origin: it.unimi.dsi/fastutil

/**
 * Returns a hash code for this map.
 *
 * The hash code of a map is computed by summing the hash codes of its entries.
 *
 * @return a hash code for this map.
 */
@Override
public int hashCode() {
  int h = 0, n = size();
  final ObjectIterator<Object2IntMap.Entry<K>> i = Object2IntMaps.fastIterator(this);
  while (n-- != 0)
    h += i.next().hashCode();
  return h;
}
@Override
origin: com.github.monnetproject/translation.fidel

public FidelDecoderWrapper(IntegerLanguageModel languageModel, DecoderWeights weights) {
  this.languageModel = languageModel;
  this.srcWordMap = Object2IntMaps.synchronize(new Object2IntOpenHashMap<String>());
  this.srcInvMap = Int2ObjectMaps.synchronize(new Int2ObjectOpenHashMap<String>());
  this.trgWordMap = languageModel.wordMap();
  this.invWordMap = languageModel.invWordMap();
  this.weights = weights;
}
origin: com.metsci.glimpse/glimpse-extras-dnc

this.coverages = unmodifiableList( readQueryCoveragesFile( coveragesFile, charset ) );
this.libraryNums = Object2IntMaps.unmodifiable( invertList( libraries ) );
this.coverageNums = Object2IntMaps.unmodifiable( invertList( coverages ) );
origin: it.unimi.dsi/fastutil

  @Override
  public String toString() {
    final StringBuilder s = new StringBuilder();
    final ObjectIterator<Object2IntMap.Entry<K>> i = Object2IntMaps.fastIterator(this);
    int n = size();
    Object2IntMap.Entry<K> e;
    boolean first = true;
    s.append("{");
    while (n-- != 0) {
      if (first)
        first = false;
      else
        s.append(", ");
      e = i.next();
      if (this == e.getKey())
        s.append("(this map)");
      else
        s.append(String.valueOf(e.getKey()));
      s.append("=>");
      s.append(String.valueOf(e.getIntValue()));
    }
    s.append("}");
    return s.toString();
  }
}
origin: com.metsci.glimpse/glimpse-extras-dnc

this.coverages = unmodifiableList( readRenderCoveragesFile( coveragesFile, charset ) );
this.libraryNums = Object2IntMaps.unmodifiable( invertList( libraries ) );
this.coverageNums = Object2IntMaps.unmodifiable( invertList( coverages ) );
origin: it.unimi.dsi/fastutil

/** {@inheritDoc} */
@SuppressWarnings({"unchecked", "deprecation"})
@Override
public void putAll(final Map<? extends K, ? extends Integer> m) {
  if (m instanceof Object2IntMap) {
    ObjectIterator<Object2IntMap.Entry<K>> i = Object2IntMaps.fastIterator((Object2IntMap<K>) m);
    while (i.hasNext()) {
      final Object2IntMap.Entry<? extends K> e = i.next();
      put(e.getKey(), e.getIntValue());
    }
  } else {
    int n = m.size();
    final Iterator<? extends Map.Entry<? extends K, ? extends Integer>> i = m.entrySet().iterator();
    Map.Entry<? extends K, ? extends Integer> e;
    while (n-- != 0) {
      e = i.next();
      put(e.getKey(), e.getValue());
    }
  }
}
/**
origin: com.metsci.glimpse/glimpse-extras-dnc

public QueryDatabase( File flatDir, DncProjection proj, ExecutorService exec ) throws IOException
{
  this.flatDir = flatDir;
  this.proj = proj;
  this.exec = exec;
  this.charset = readFlatCharset( flatDir );
  this.fcodeNames = Int2ObjectMaps.unmodifiable( readFlatFcodeNames( flatDir, charset ) );
  this.attrNames = Int2ObjectMaps.unmodifiable( readFlatAttrNames( flatDir, charset ) );
  this.flatLibraryNums = Object2IntMaps.unmodifiable( invertIdsMap( readFlatLibraryNames( flatDir, charset ) ) );
  this.flatCoverageNums = Object2IntMaps.unmodifiable( invertIdsMap( readFlatCoverageNames( flatDir, charset ) ) );
  this.bufMutex = new Object( );
  this.featuresBufMasters = unmodifiableMap( readFlatChunks( flatDir ) );
  this.ringsBufMaster = memmapFlatRingsBuf( flatDir );
  this.verticesBufMaster = memmapFlatVerticesBuf( flatDir );
  this.attrsBufMaster = memmapFlatAttrsBuf( flatDir );
  this.stringsBufMaster = memmapFlatStringsBuf( flatDir );
}
origin: com.metsci.glimpse/glimpse-extras-dnc

public TransitionalDatabase( File flatDir, DncProjection proj, ListMultimap<String,DncGeosymAssignment> geosymAssignments, Function<String,Object> externalAttrs ) throws IOException
{
  this.flatDir = flatDir;
  this.proj = proj;
  this.geosymAssignments = geosymAssignments;
  this.externalAttrs = externalAttrs;
  this.charset = readFlatCharset( flatDir );
  this.fcodeNames = Int2ObjectMaps.unmodifiable( readFlatFcodeNames( flatDir, charset ) );
  this.attrNames = Int2ObjectMaps.unmodifiable( readFlatAttrNames( flatDir, charset ) );
  this.flatLibraryNums = Object2IntMaps.unmodifiable( invertIdsMap( readFlatLibraryNames( flatDir, charset ) ) );
  this.flatCoverageNums = Object2IntMaps.unmodifiable( invertIdsMap( readFlatCoverageNames( flatDir, charset ) ) );
  this.bufMutex = new Object( );
  this.featuresBufMasters = unmodifiableMap( readFlatChunks( flatDir ) );
  this.ringsBufMaster = memmapFlatRingsBuf( flatDir );
  this.verticesBufMaster = memmapFlatVerticesBuf( flatDir );
  this.attrsBufMaster = memmapFlatAttrsBuf( flatDir );
  this.stringsBufMaster = memmapFlatStringsBuf( flatDir );
}
it.unimi.dsi.fastutil.objectsObject2IntMaps

Javadoc

A class providing static methods and objects that do useful things with type-specific maps.

Most used methods

  • unmodifiable
    Returns an unmodifiable type-specific map backed by the given type-specific map.
  • fastIterator
    Returns an iterator that will be FastEntrySet, if possible, on the Map#entrySet() of the provided ma
  • synchronize
    Returns a synchronized type-specific map backed by the given type-specific map, using an assigned ob

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • findViewById (Activity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • IsNull (org.hamcrest.core)
    Is the value null?
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