Package gnu.trove

Examples of gnu.trove.TIntIntHashMap


  {
    Set survivors = new THashSet (variablesSet ());
    survivors.remove (victim);

    int vi = 0;
    TIntIntHashMap dict = new TIntIntHashMap (survivors.size ());
    // dict.setDefaultValue (-1);  No longer supported, but this.getIndex() written to avoid need for this.
    my2global = new int[survivors.size ()];

    for (Iterator it = survivors.iterator (); it.hasNext();) {
      Variable var = (Variable) it.next ();
      int gvi = var.getIndex ();
      dict.put (gvi, vi);
      my2global [vi] = gvi;
    }

    projectionMap = dict;
    numNodes--;  // do this at end b/c it affects getVertexSet()
View Full Code Here


/* 281 */     return new Operation() {
/*     */       public void theirs() {
/*     */       }
/*     */
/*     */       public void ours() {
/* 286 */         TIntIntHashMap ours = new TIntIntHashMap(100000);
/* 287 */         for (int i = Main.dataset.size(); i-- > 0; )
/* 288 */           ours.put(i, i);
/*     */       }
/*     */
/*     */       public String toString()
/*     */       {
/* 293 */         return Main.dataset.size() + " entry primitive int map.put timing run; no basis for comparison";
View Full Code Here

  private TIntIntHashMap mySingle;
  private TIntObjectHashMap<TIntHashSet> myMulti;


  public IntToIntSetMap(int initialCapacity, float loadfactor) {
    mySingle = new TIntIntHashMap(initialCapacity, loadfactor);
    myMulti = new TIntObjectHashMap<TIntHashSet>(initialCapacity, loadfactor);
  }
View Full Code Here

        Boolean match = new Boolean(expression.match(context));

        // update the context mapping from this last visit
        // did we visit some args(<name>) nodes ?
        if (!context.m_exprIndexToTargetIndex.isEmpty()) {
            TIntIntHashMap sourceToTargetArgIndexes = new TIntIntHashMap();
            int index = 0;
            for (Iterator it = m_expressionInfo.getArgumentNames().iterator(); it.hasNext(); index++) {
                String adviceParamName = (String) it.next();
                //look for adviceParamName in the expression name and get its index
                int exprArgIndex = ArgsIndexVisitor.getExprArgIndex(m_expression, adviceParamName);
                if (exprArgIndex < 0) {
                    //param of advice not found in pc signature - f.e. "joinPoint"
                    continue;
                }
                int adviceArgIndex = m_expressionInfo.getArgumentIndex(adviceParamName);
                int targetArgIndex = context.m_exprIndexToTargetIndex.get(exprArgIndex);
                //                System.out.println(" transitive arg" + adviceArgIndex + " " + adviceParamName + " -> " + exprArgIndex
                // + " -> " + targetArgIndex);
                sourceToTargetArgIndexes.put(adviceArgIndex, targetArgIndex);
            }
            context.m_exprIndexToTargetIndex = sourceToTargetArgIndexes;

            //debug:
            //            if (m_expressionInfo.m_isAdviceBindingWithArgs) {
View Full Code Here

TOP

Related Classes of gnu.trove.TIntIntHashMap

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.