Examples of Pair


Examples of csa.jportal.ai.helper.Pair

        sc.addScore(st.getHealingPreference()*10, AIHelper.AI_STRATEGIE_HEALING);
        sc.addScore(st.getPlayerDamagePreference()*10, AIHelper.AI_STRATEGIE_PLAYER_DAMAGE);
        sc.sort();

        int listSize = 0;
        Pair pairs[] = new Pair[7];
        for (int i=0; i<6; i++)
        {
            pairs[i] = new Pair();
            pairs[i].type = sc.getHighScoreTypeString();
            pairs[i].value = sc.getHighScoreValue();
            pairs[i].wanted = (pairs[i].value != 0);

            pairs[i].subListHeap = AIHelper.getSubListByType(tHeap, pairs[i].type);

            pairs[i].subListBooster = AIHelper.getSubListByType(tBooster, pairs[i].type);
            if (tHeap.size() > 0)
                pairs[i].current = (pairs[i].subListHeap.size()*100) / tHeap.size();
            sc.removeType(pairs[i].type);
            listSize += pairs[i].subListBooster.size();
        }
        pairs[6] = new Pair();
        if (listSize==0)
        {
            pairs[6].subListBooster = tHeap.copyList();
        }

View Full Code Here

Examples of edu.stanford.nlp.util.Pair

  private static final String HACER_TIME_FORM = "(?i)^(?:hac(?:er|ía))$";

  @SuppressWarnings("unchecked")
  private void buildAnnotations() {
    // +.25 F1
    annotations.put("-markInf", new Pair("/^(S|grup\\.verb|infinitiu|gerundi)/ < @infinitiu",
                                         new SimpleStringFunction("-infinitive")));
    annotations.put("-markGer", new Pair("/^(S|grup\\.verb|infinitiu|gerundi)/ < @gerundi",
                                         new SimpleStringFunction("-gerund")));

    // +.04 F1
    annotations.put("-markRelative", new Pair("@S <, @relatiu",
                                              new SimpleStringFunction("-relative")));

    // Negative F1; unused in default config
    annotations.put("-markPPHeads", new Pair("@sp",
                                             new AnnotateHeadFunction(headFinder)));

    // +.1 F1
    annotations.put("-markComo", new Pair("@cs < /(?i)^como$/",
                                          new SimpleStringFunction("[como]")));
    annotations.put("-markSpecHeads", new Pair("@spec", new AnnotateHeadFunction(headFinder)));

    // +.32 F1
    annotations.put("-markSingleChildNPs", new Pair("/^(sn|grup\\.nom)/ <: __",
                                                    new SimpleStringFunction("-singleChild")));

    // +.05 F1
    annotations.put("-markPPFriendlyVerbs", new Pair("/^v/ > /^grup\\.prep/",
                                                     new SimpleStringFunction("-PPFriendly")));

    // +.46 F1
    annotations.put("-markConjTypes", new Pair("@conj <: /^c[cs]/=c", new MarkConjTypeFunction()));

    // +.09 F1
    annotations.put("-markPronounNPs", new Pair("/^(sn|grup\\.nom)/ <<: /^p[0p]/",
                                                new SimpleStringFunction("-pronoun")));

    // +1.39 F1
    annotations.put("-markParticipleAdjs", new Pair(
      "@aq0000 < /(?i)([aeií]d|puest|biert|vist|(ben|mal)dit|[fh]ech|scrit|muert|[sv]uelt|[rl]ect|"
        + "frit|^(rot|dich|impres|desnud|sujet|exent))[oa]s?$/",
      new SimpleStringFunction("-part")));

    // Negative F1; unused in default config
    annotations.put("-markSentenceInitialClauses", new Pair("@S !, __",
                                                            new SimpleStringFunction("-init")));

    // Insignificant F1; unused in default config
    annotations.put("-markPoder", new Pair(
      String.format("/^(infinitiu|gerundi|grup\\.verb)/ <<: /%s/", PODER_FORM),
      new SimpleStringFunction("-poder")));

    // +.29 F1
    annotations.put("-markBaseNPs", new Pair("/^grup\\.nom/ !< (__ < (__ < __))",
                                             new SimpleStringFunction("-base")));

    // +.17 F1
    annotations.put("-markVerbless", new Pair("@S|sentence !<< /^(v|participi$)/",
                                              new SimpleStringFunction("-verbless")));

    // +.23 F1
    annotations.put("-markDominatesVerb", new Pair("__ << (/^(v|participi$)/ < __)",
                                                   new SimpleStringFunction("-dominatesV")));

    // Negative F1 -- not used by default
    annotations.put("-markNonRecSPs", new Pair("@sp !<< @sp", new SimpleStringFunction("-nonRec")));

    // In right-recursive verb phrases, mark the prefix of the first verb on its tag.
    // This annotation tries to capture the fact that only a few roots are ever really part of
    // these constructions: poder, deber, ir, etc.
    annotations.put("-markRightRecVPPrefixes",
                    new Pair("/^v/ $+ @infinitiu|gerundi >, /^(grup.verb|infinitiu|gerundi)/",
                             new MarkPrefixFunction(3)));


    // Negative F1 -- not used by default
    annotations.put("-markParentheticalNPs", new Pair("@sn <<, fpa <<` fpt",
                                                      new SimpleStringFunction("-paren")));
    annotations.put("-markNumericNPs", new Pair("@sn << (/^z/ < __) !<< @sn",
                                                new SimpleStringFunction("-num")));

    // Negative F1 -- not used by default
    annotations.put("-markCoordinatedNPs", new Pair(
      "@sn <, (/^(sn|grup\\.nom)/ $+ (@conj < /^(cc|grup\\.cc)/ $+ /^(sn|grup\\.nom)/=last))" +
        "<` =last",
      new SimpleStringFunction("-coord")));

    annotations.put("-markHacerTime", new Pair(
      String.format("/^vm/ < /%s/ $+ /^d/", HACER_TIME_FORM),
      new SimpleStringFunction("-hacerTime")));

    compileAnnotations(headFinder);
  }
View Full Code Here

Examples of edu.uci.ics.jung.graph.util.Pair

  @Override
  public Pair<V> getEndpoints(E arg0)
  {
   
    return new Pair(g.getEdgeSource(arg0),g.getEdgeTarget(arg0));
  }
View Full Code Here

Examples of edu.uci.ics.jung.utils.Pair

    private double radius;

    /** Creates a new instance of BallonLayout2 */
    public BallonLayout2(Graph g) {
        super(g);
        key = new Pair(this,  BALOON_KEY);
    }
View Full Code Here

Examples of game.slot.Pair

      //Add the intermediate summing slot
      Sum intermediate = new Sum(1, "Intermediate sum", 105);
      playerXStats.add(intermediate);
     
      //Add the lower section score slots
      Pair onePair = new Pair("One pair", 12);
      playerXStats.add(onePair);
      TwoPair twoPair = new TwoPair("Two pairs", 22);
      playerXStats.add(twoPair);
      XOAK threeOfAKind = new XOAK(3, "Three of a kind", 18);
      playerXStats.add(threeOfAKind);
View Full Code Here

Examples of geometry.java.Pair

        }
        Point[] inputA = points.toArray(new Point[points.size()]);
        Arrays.sort(inputA, Point.COMPARE_X);
        Point[] inputB = Arrays.copyOf(inputA, inputA.length);
       
        Pair divide = Points.divideAndConquer(inputA);
        Pair force = bruteForce(inputB);
       
        assertEquals(force, divide);
    }
View Full Code Here

Examples of javafx.util.Pair

            if (type.isAssignableFrom(Collection.class)) {
                final ParameterizedType parameterizedType = (ParameterizedType) field.getGenericType();
                String clazz = null;
                try {
                    clazz = parameterizedType.getActualTypeArguments()[0].getTypeName();
                    return new Pair(field.getName(), Class.forName(clazz));
                } catch (ClassNotFoundException ex) {
                    throw new IllegalStateException("Cannot find class " + clazz, ex);
                }
            }
        }
View Full Code Here

Examples of javassist.compiler.ast.Pair

/*      */
/*  215 */     int var = getMaxLocals();
/*  216 */     incMaxLocals(1);
/*  217 */     while (catchList != null)
/*      */     {
/*  219 */       Pair p = (Pair)catchList.head();
/*  220 */       catchList = catchList.tail();
/*  221 */       Declarator decl = (Declarator)p.getLeft();
/*  222 */       Stmnt block = (Stmnt)p.getRight();
/*      */
/*  224 */       decl.setLocalVar(var);
/*      */
/*  226 */       CtClass type = this.resolver.lookupClassByJvmName(decl.getClassName());
/*  227 */       decl.setClassName(MemberResolver.javaToJvmName(type.getName()));
View Full Code Here

Examples of javax.el.TesterEvaluationListener.Pair

        Assert.assertTrue(context.isPropertyResolved());
        Assert.assertEquals("test", result);
        List<Pair> events = listener.getResolvedProperties();

        Assert.assertEquals(1, events.size());
        Pair p = events.get(0);
        Assert.assertEquals(bean, p.getBase());
        Assert.assertEquals("name", p.getProperty());
    }
View Full Code Here

Examples of jjil.j2se.algorithm.Pair

            RyInvSmall = 0;
        }
        if (RxInvLarge != 0 && RyInvSmall != 0) {
            Ry = new Vec2(RadiusGyrMaxMan, RadiusGyrMaxExp);
        }
        return new Pair(Rx, Ry);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.