Tabnine Logo
IntOpenHashSet.size
Code IndexAdd Tabnine to your IDE (free)

How to use
size
method
in
com.carrotsearch.hppc.IntOpenHashSet

Best Java code snippets using com.carrotsearch.hppc.IntOpenHashSet.size (Showing top 13 results out of 315)

origin: clearnlp/clearnlp

/** Initializes random centroids. */
private void initCentroids()
{
  IntOpenHashSet set = new IntOpenHashSet();
  Random rand = new Random(RAND_SEED);
  d_centroid  = new double[K*D];
  d_scala     = new double[K];
  
  while (set.size() < K)
    set.add(rand.nextInt(N));
  int[] unit;
  int k = 0;
  
  for (IntCursor cur : set)
  {
    unit = v_units.get(cur.value);
    
    for (int index : unit)
      d_centroid[getCentroidIndex(k, index)] = 1;
    
    d_scala[k++] = Math.sqrt(unit.length);
  }
}

origin: com.googlecode.clearnlp/clearnlp

/** Initializes random centroids. */
private void initCentroids()
{
  IntOpenHashSet set = new IntOpenHashSet();
  Random rand = new Random(RAND_SEED);
  d_centroid  = new double[K*D];
  d_scala     = new double[K];
  
  while (set.size() < K)
    set.add(rand.nextInt(N));
  int[] unit;
  int k = 0;
  
  for (IntCursor cur : set)
  {
    unit = v_units.get(cur.value);
    
    for (int index : unit)
      d_centroid[getCentroidIndex(k, index)] = 1;
    
    d_scala[k++] = Math.sqrt(unit.length);
  }
}

origin: com.clearnlp/clearnlp

/** Initializes random centroids. */
private void initCentroids()
{
  IntOpenHashSet set = new IntOpenHashSet();
  Random rand = new Random(RAND_SEED);
  d_centroid  = new double[K*D];
  d_scala     = new double[K];
  
  while (set.size() < K)
    set.add(rand.nextInt(N));
  int[] unit;
  int k = 0;
  
  for (IntCursor cur : set)
  {
    unit = v_units.get(cur.value);
    
    for (int index : unit)
      d_centroid[getCentroidIndex(k, index)] = 1;
    
    d_scala[k++] = Math.sqrt(unit.length);
  }
}

origin: dice-group/Palmetto

private BitSet[] createBitSets(IntOpenHashSet hashSets[],
    IntOpenHashSet mergedHashSet) {
  BitSet bitSets[] = new BitSet[hashSets.length];
  for (int i = 0; i < bitSets.length; ++i) {
    bitSets[i] = new BitSet(mergedHashSet.size());
  }
  int pos = 0;
  for (int i = 0; i < mergedHashSet.keys.length; i++) {
    if (mergedHashSet.allocated[i]) {
      for (int j = 0; j < bitSets.length; ++j) {
        if (hashSets[j].contains(mergedHashSet.keys[i])) {
          bitSets[j].set(pos);
        }
      }
      ++pos;
    }
  }
  return bitSets;
}
origin: clearnlp/clearnlp

ni = si.size();
  nj = sj.size();
origin: com.clearnlp/clearnlp

ni = si.size();
  nj = sj.size();
origin: com.googlecode.clearnlp/clearnlp

ni = si.size();
  nj = sj.size();
origin: com.clearnlp/clearnlp

if (set.size() > max.i2)
  max.set(key, set.size());
origin: clearnlp/clearnlp

if (set.size() > max.i2)
  max.set(key, set.size());
origin: com.googlecode.clearnlp/clearnlp

if (set.size() > max.i2)
  max.set(key, set.size());
origin: com.clearnlp/clearnlp

if (arg.hasType(",") && max.o2.size() < set.size())
  max.set(arg, set);
origin: com.googlecode.clearnlp/clearnlp

if (arg.hasType(",") && max.o2.size() < set.size())
  max.set(arg, set);
origin: clearnlp/clearnlp

if (arg.hasType(",") && max.o2.size() < set.size())
  max.set(arg, set);
com.carrotsearch.hppcIntOpenHashSetsize

Popular methods of IntOpenHashSet

  • <init>
  • addAll
  • add
  • contains
  • clear
  • clone
  • isEmpty
  • remove
  • removeAll
  • retainAll
  • toArray
  • from
  • toArray,
  • from

Popular in Java

  • Start an intent from android
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • findViewById (Activity)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Permission (java.security)
    Legacy security code; do not use.
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top Vim plugins
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