congrats Icon
New! Announcing our next generation AI code completions
Read here
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

  • Finding current android device location
  • getApplicationContext (Context)
  • getSystemService (Context)
  • putExtra (Intent)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now