Package com.carrotsearch.hppc

Examples of com.carrotsearch.hppc.IntOpenHashSet


   
    l_branches = Lists.newArrayList();
     l_states   = Lists.newArrayList();
    l_2ndHeads = Lists.newArrayList();
     n_2ndPos   = new double[t_size];
     s_reduce   = new IntOpenHashSet();
    
     int i; for (i=0; i<t_size; i++)
       l_2ndHeads.add(new ArrayList<DEPHead>());
  }
View Full Code Here


      getSubNodeCollectionAux(col, arc.getNode());
  }
 
  public IntOpenHashSet getSubIdSet()
  {
    IntOpenHashSet set = new IntOpenHashSet();
   
    getSubIdSetAux(set, this);
    return set;
  }
View Full Code Here

   * The array is sorted in ascending order.
   * @return an array of IDs from the subtree of this node, including the ID of this node.
   */
  public int[] getSubIdArray()
  {
    IntOpenHashSet set = getSubIdSet();
    int[] list = set.toArray();
    Arrays.sort(list);
   
    return list;
  }
View Full Code Here

   
    l_branches = Lists.newArrayList();
     l_states   = Lists.newArrayList();
    l_2ndHeads = Lists.newArrayList();
     n_2ndPos   = new double[t_size];
     s_reduce   = new IntOpenHashSet();
    
     int i; for (i=0; i<t_size; i++)
       l_2ndHeads.add(new ArrayList<DEPHead>());
  }
View Full Code Here

  {
    super(tree);
   
    d_tree  = tree;
    i_pred  = 0;
    s_skip  = new IntOpenHashSet();
    l_argns = Lists.newArrayList();
    m_argns = Maps.newHashMap();
    m_refs  = Maps.newHashMap();
   
    initArcs(tree);
View Full Code Here

      getSubNodeCollectionAux(col, arc.getNode());
  }
 
  public IntOpenHashSet getSubIdSet()
  {
    IntOpenHashSet set = new IntOpenHashSet();
   
    getSubIdSetAux(set, this);
    return set;
  }
View Full Code Here

   * The array is sorted in ascending order.
   * @return an array of IDs from the subtree of this node, including the ID of this node.
   */
  public int[] getSubIdArray()
  {
    IntOpenHashSet set = getSubIdSet();
    int[] list = set.toArray();
    Arrays.sort(list);
   
    return list;
  }
View Full Code Here

  {
    int i, size = size();
     
    StringIntPair[]   H = new StringIntPair[size];
    List<DEPCountArc> F = new ArrayList<DEPCountArc>();
    IntOpenHashSet    T = new IntOpenHashSet();
    DEPCountArc a;
   
    StringIntPair[] t = lHeads.get(0);
     
    for (i=1; i<size; i++)
      H[i] = new StringIntPair(t[i].s, t[i].i);
     
    T.add(DEPLib.ROOT_ID);
    F.addAll(getArcs(lHeads, T));
     
    while (!F.isEmpty())
    {
      UTCollection.sortReverseOrder(F);
      a = F.get(0);
     
      H[a.depId].i = a.headId;
      H[a.depId].s = a.deprel;
   
      T.add(a.depId);
      removeArcs(F, a.depId);
     
      F.addAll(getArcs(lHeads, T));     
    }
     
View Full Code Here

  }
 
  /** Called by {@link DEPTree#projectivize()}. */
  private DEPNode getSmallestNonProjectiveArc(IntArrayList ids)
  {
    IntOpenHashSet remove = new IntOpenHashSet();
    DEPNode wk, nonProj = null;
    int np, max = 0;
   
    for (IntCursor cur : ids)
    {
      wk = get(cur.value);
      np = isNonProjective(wk);
     
      if (np == 0)
      {
        remove.add(cur.value);
      }
      else if (np > max)
      {
        nonProj = wk;
        max = np;
View Full Code Here

  }
 
  @Deprecated
  private void addNonProjectiveMap(IntObjectOpenHashMap<IntOpenHashSet> map, int cIdx, int nIdx)
  {
    IntOpenHashSet set;
   
    if (map.containsKey(cIdx))
      set = map.get(cIdx);
    else
    {
      set = new IntOpenHashSet();
      map.put(cIdx, set);
    }
   
    set.add(nIdx);
  }
View Full Code Here

TOP

Related Classes of com.carrotsearch.hppc.IntOpenHashSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.