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

How to use
Int2ObjectMaps
in
it.unimi.dsi.fastutil.ints

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: org.apache.giraph/giraph-core

@Override
protected Int2ObjectMap<OutEdges<IntWritable, E>> getPartitionEdges(
  int partitionId) {
 Int2ObjectMap<OutEdges<IntWritable, E>> partitionEdges =
   (Int2ObjectMap<OutEdges<IntWritable, E>>)
     transientEdges.get(partitionId);
 if (partitionEdges == null) {
  Int2ObjectMap<OutEdges<IntWritable, E>> newPartitionEdges =
    Int2ObjectMaps.synchronize(
      new Int2ObjectOpenHashMap<OutEdges<IntWritable, E>>());
  partitionEdges = (Int2ObjectMap<OutEdges<IntWritable, E>>)
    transientEdges.putIfAbsent(partitionId,
      newPartitionEdges);
  if (partitionEdges == null) {
   partitionEdges = newPartitionEdges;
  }
 }
 return partitionEdges;
}
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<Int2ObjectMap.Entry<V>> i = Int2ObjectMaps.fastIterator(this);
  while (n-- != 0)
    h += i.next().hashCode();
  return h;
}
@Override
origin: com.metsci.glimpse/glimpse-extras-dnc

public DncGeosymTextStyle(Font font, int colorCode, String prefix, String suffix, Int2ObjectMap<String> abbrevs)
{
  this.font = font;
  this.colorCode = colorCode;
  this.prefix = prefix;
  this.suffix = suffix;
  this.abbrevs = (abbrevs == null ? null : unmodifiable(new Int2ObjectOpenHashMap<String>(abbrevs)));
}
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.geosymAssignments = Int2ObjectMaps.unmodifiable( readDncSymbolAssignments( config.geosymAssignmentsFilename ) );
origin: it.unimi.dsi/fastutil

  @Override
  public String toString() {
    final StringBuilder s = new StringBuilder();
    final ObjectIterator<Int2ObjectMap.Entry<V>> i = Int2ObjectMaps.fastIterator(this);
    int n = size();
    Int2ObjectMap.Entry<V> e;
    boolean first = true;
    s.append("{");
    while (n-- != 0) {
      if (first)
        first = false;
      else
        s.append(", ");
      e = i.next();
      s.append(String.valueOf(e.getIntKey()));
      s.append("=>");
      if (this == e.getValue())
        s.append("(this map)");
      else
        s.append(String.valueOf(e.getValue()));
    }
    s.append("}");
    return s.toString();
  }
}
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: it.unimi.dsi/fastutil

/** {@inheritDoc} */
@SuppressWarnings({"unchecked", "deprecation"})
@Override
public void putAll(final Map<? extends Integer, ? extends V> m) {
  if (m instanceof Int2ObjectMap) {
    ObjectIterator<Int2ObjectMap.Entry<V>> i = Int2ObjectMaps.fastIterator((Int2ObjectMap<V>) m);
    while (i.hasNext()) {
      final Int2ObjectMap.Entry<? extends V> e = i.next();
      put(e.getIntKey(), e.getValue());
    }
  } else {
    int n = m.size();
    final Iterator<? extends Map.Entry<? extends Integer, ? extends V>> i = m.entrySet().iterator();
    Map.Entry<? extends Integer, ? extends V> e;
    while (n-- != 0) {
      e = i.next();
      put(e.getKey(), e.getValue());
    }
  }
}
/**
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.intsInt2ObjectMaps

Javadoc

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

Most used methods

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

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • addToBackStack (FragmentTransaction)
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Notification (javax.management)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
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