congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IntOpenHashSet
Code IndexAdd Tabnine to your IDE (free)

How to use
IntOpenHashSet
in
com.carrotsearch.hppc

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

origin: com.googlecode.clearnlp/clearnlp

/**
 * Returns a set of terminal IDs belonging to this argument given the specific tree.
 * @param tree the constituent tree.
 * @return a set of terminal IDs belonging to this argument.
 */
public IntOpenHashSet getTerminalIdSet(CTTree tree)
{
  IntOpenHashSet set = new IntOpenHashSet();
  
  for (PBLoc loc : l_locs)
    set.addAll(tree.getNode(loc).getSubTerminalIdSet());
  
  return set;
}

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

public boolean isSkip(DEPNode node)
{
  return s_skip.contains(node.id);
}

origin: com.clearnlp/clearnlp

static public IntOpenHashSet intersection(IntContainer c1, IntContainer c2)
{
  IntOpenHashSet s1 = new IntOpenHashSet(c1);
  IntOpenHashSet s2 = new IntOpenHashSet(c2);
  
  s1.retainAll(s2);
  return s1;
}

origin: clearnlp/clearnlp

public DEPNode moveToNextPredicate()
{
  DEPNode pred = d_tree.getNextPredicate(i_pred);
  
  if (pred != null)
  {
    i_pred = pred.id;
    d_lca  = pred;
    l_argns.clear();
    m_argns.clear();
    s_skip.clear();
    s_skip.add(i_pred);
    s_skip.add(DEPLib.ROOT_ID);
  }
    
  return pred;
}

origin: com.clearnlp/clearnlp

    if (set.size() > max.i2)
      max.set(key, set.size());
    remove = new IntOpenHashSet();
        if (set.contains(max.i1))
          set.remove(max.i1);
          if (set.isEmpty())	remove.add(cur.value);
return new IntOpenHashSet(map.keys());
origin: com.clearnlp/clearnlp

if (pair == null)	return null;
Pair<PBArg,IntOpenHashSet> max = new Pair<PBArg,IntOpenHashSet>(null, new IntOpenHashSet());
IntOpenHashSet set;
CTNode prn = pair.o1;
  if (set.contains(esm.getTerminalId()))
  if (arg.hasType(",") && max.o2.size() < set.size())
    max.set(arg, set);
origin: com.clearnlp/clearnlp

public IntOpenHashSet getSubTerminalIdSet()
{
  IntOpenHashSet set = new IntOpenHashSet();
  
  for (CTNode node : getSubTerminals())
    set.add(node.getTerminalId());
  
  return set;
}

origin: com.googlecode.clearnlp/clearnlp

public IntOpenHashSet getSubIdSet()
{
  IntOpenHashSet set = new IntOpenHashSet();
  
  getSubIdSetAux(set, this);
  return set;
}
origin: clearnlp/clearnlp

public void addArgumentToSkipList()
{
  s_skip.add(i_arg);
}

origin: com.clearnlp/clearnlp

ni = si.size();
  nj = sj.size();
  else if (!UTHppc.intersection(si, sj).isEmpty())
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: com.googlecode.clearnlp/clearnlp

private int[] getSpan(DEPNode pred, DEPNode arg)
{
  IntOpenHashSet sArg = arg .getSubIdSet();
  
  if (pred.isDescendentOf(arg))
    sArg.removeAll(pred.getSubIdSet());			
  
  int[] span = sArg.toArray();
  return span;
}

origin: com.clearnlp/clearnlp

if (set.isEmpty())
  indices = set.toArray();
  Arrays.sort(indices);
  build.append("tpc=");
origin: edu.emory.clir/clearnlp

  public void addAll(IntHashSet set)
  {
    super.addAll(set);
  }
}
origin: com.googlecode.clearnlp/clearnlp

private void removeExistingPredicates(IntOpenHashSet[] sets, List<PBInstance> list)
{
  for (PBInstance inst : list)
  {
    for (IntOpenHashSet set : sets)
      set.remove(inst.predId);
  }
}

origin: clearnlp/clearnlp

public DEPStateBranch(DEPLabel label)
{
  this.lambda = i_lambda;
  this.beta   = i_beta;
  this.trans  = n_trans;
  this.score  = d_score;
  this.reduce = s_reduce.clone();
  this.heads  = d_tree.getHeads();
  this.label  = label;
}

origin: com.clearnlp/clearnlp

public void reInit()
{
  initPrimitives();
     l_branches.clear();
   l_states.clear();
      for (List<DEPHead> list : l_2ndHeads)
     list.clear();
      Arrays.fill(n_2ndPos, 0);
   s_reduce.clear();
   d_tree.clearHeads();             
}

origin: clearnlp/clearnlp

    if (set.size() > max.i2)
      max.set(key, set.size());
    remove = new IntOpenHashSet();
        if (set.contains(max.i1))
          set.remove(max.i1);
          if (set.isEmpty())	remove.add(cur.value);
return new IntOpenHashSet(map.keys());
origin: com.googlecode.clearnlp/clearnlp

if (pair == null)	return null;
Pair<PBArg,IntOpenHashSet> max = new Pair<PBArg,IntOpenHashSet>(null, new IntOpenHashSet());
IntOpenHashSet set;
CTNode prn = pair.o1;
  if (set.contains(esm.getTerminalId()))
  if (arg.hasType(",") && max.o2.size() < set.size())
    max.set(arg, set);
com.carrotsearch.hppcIntOpenHashSet

Most used methods

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

Popular in Java

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getExternalFilesDir (Context)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • ImageIO (javax.imageio)
  • Best IntelliJ 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