Examples of evaluate()


Examples of search.fitnessfunctions.SimpleXorFitnessFunction.evaluate()

  @Test
  public void testUnconnectedGraph() {
    SimpleXorFitnessFunction ft = new SimpleXorFitnessFunction();
    ft.setTree(ch);
    System.out.println(ft.evaluate(ch));

  }

  @Test
  public void testConnectedXorTrue() {

Examples of tcg.common.util.ExpressionParser.evaluate()

   
    //set-constant-value (string)
    parser = new ExpressionParser("true", Boolean.class);
    try
    {
      boolResult = (Boolean)parser.evaluate();
      Assert.assertNotNull(boolResult);
      Assert.assertEquals(true, boolResult.booleanValue());
    }
    catch(Exception ex)
    {

Examples of trees.ExpressionTree.evaluate()

        System.out.println("Infix expression of the tree: " + tree.infixExpression());

        System.out.println("Postfix expression of the tree: " + tree.postfixExpression());

        System.out.println("Expression evaluated at: " + fmt.format(tree.evaluate()));
       
    }

}

Examples of us.codecraft.xsoup.XPathEvaluator.evaluate()

        System.out.println("=============");

        XPathEvaluator compile = Xsoup.compile("//a");
        time =System.currentTimeMillis();
        for (int i = 0; i < 2000; i++) {
            compile.evaluate(document);
        }
        System.out.println(System.currentTimeMillis()-time);

    }

Examples of wyvern.tools.typedAST.core.Sequence.evaluate()

    TypedAST testAST = new Sequence(
        new ValDeclaration("x", new IntegerConstant(4), null),
        new Application(new TSLBlock(new Fn(Arrays.asList(new NameBindingImpl("x", Int.getInstance())),
            new SpliceExn(new Variable(new NameBindingImpl("x", Int.getInstance()), null)))), new IntegerConstant(9), null) );
    Type result = testAST.typecheck(Globals.getStandardEnv(), Optional.<Type>empty());
    Value out = testAST.evaluate(Globals.getStandardEnv());
    int finalRes = ((IntegerConstant)out).getValue();
    Assert.assertEquals(4, finalRes);
  }

  @Test

Examples of wyvern.tools.typedAST.interfaces.TypedAST.evaluate()

    try {
      Reader reader = new FileReader(file);
      TypedAST res = (TypedAST) new Wyvern().parse(reader, filename);
      res.typecheck(Globals.getStandardEnv(), Optional.empty());
      res = new DSLTransformer().transform(res);
      Value finalV = res.evaluate(Globals.getStandardEnv());
      TreeWriter t = new TreeWriter();
      finalV.writeArgsToTree(t);
      System.out.println(t.getResult());
    } catch (IOException e) {
      System.err.println("Error reading file " + filename);
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.