Examples of eval()


Examples of jep.Jep.eval()

            // execute the python script



            //jep.runScript("./delegator.py");
            jep.eval("delegate()");


            String ret_val = (String) jep.getValue("ret_val");
            return ret_val;
        } catch (jep.JepException e) {
View Full Code Here

Examples of jpbrt.core.Ray.eval()

            if (thit > ray.maxt)
                return result;
        }
       
        // compute sphere hit position and phi
        Point phit = ray.eval(thit);
        if (phit.x == 0.0 && phit.y == 0.0)
            phit.x = 1e-5 * radius;
        double phi = Math.atan2(phit.y, phit.x);
        if (phi < 0.0)
            phi += 2 * Math.PI;
 
View Full Code Here

Examples of kiss.lang.Expression.eval()

  @Override
  public Expression optimise() {
    Expression b=body.optimise();
    Type bt=body.getType();
    if (b.isConstant()) {
      Object val=b.eval();
      if (type.checkInstance(val)) throw new KissException("Impossible to cast value "+val+" to type: "+type);
      // TODO: is this logic sound? what about interface casts?
      return b;
    }
    Type t=type;
View Full Code Here

Examples of kiss.lang.expression.Lambda.eval()

  @Test
  public void testIdentity() {
    Lambda id=Lambda.IDENTITY;
    FunctionType ft=(FunctionType) id.getType();
    assertEquals(Anything.INSTANCE,ft.getReturnType());
    IFn fn=(IFn) id.eval();
    assertEquals(1,fn.invoke(1));
    assertTrue(ft.checkInstance(fn));
  }
 
  @Test
View Full Code Here

Examples of litil.eval.Evaluator.eval()

        if (ev) {
            System.out.println("Evaluating ...");
            Evaluator evaluator = new Evaluator();
            System.out.println("-------------------");

            System.out.println("--" + evaluator.eval(node, Prelude.rootScope()));
        }
    }

    private static AstNode parseFile(String file) throws FileNotFoundException {
        Reader reader = new FileReader(file);
View Full Code Here

Examples of net.mindengine.galen.javascript.GalenJsExecutor.eval()

    private GalenJsExecutor createExecutor() {
        GalenJsExecutor jsExector = new GalenJsExecutor();
        jsExector.putObject("_galenCore", this);
       
        jsExector.eval(GalenJsExecutor.loadJsFromLibrary("GalenCore.js"));
        jsExector.eval(GalenJsExecutor.loadJsFromLibrary("GalenApi.js"));
        jsExector.eval(GalenJsExecutor.loadJsFromLibrary("GalenPages.js"));
        return jsExector;
    }
View Full Code Here

Examples of net.sf.sahi.rhino.RhinoScriptRunner.eval()

        ScriptRunner scriptRunner = session.getScriptRunner();
        String result = "null";
        if (scriptRunner instanceof RhinoScriptRunner){
          RhinoScriptRunner rsr = (RhinoScriptRunner) session.getScriptRunner();
          toEval = SahiScript.modifyFunctionNames(toEval);
      result = rsr.eval(toEval);
        } else {
          logger.warning("Should not have come here: RhinoRuntime.eval: " + toEval);
        }
        return new NoCacheHttpResponse(result);
    }
View Full Code Here

Examples of netscape.javascript.JSObject.eval()

            throw new IllegalArgumentException("No applet is hosting the given application.");
        }

        try {
            JSObject window = JSObject.getWindow(applicationHostApplet);
            return window.eval(script);
        } catch (Throwable throwable) {
            throw new UnsupportedOperationException(throwable);
        }
    }
View Full Code Here

Examples of nexj.core.scripting.Machine.eval()

               }
            }

            if (nOutput == OUTPUT_NONE || machine.isEvalSupported(pair))
            {
               return new ConstantOperator(machine.eval(obj, pair.getNext()));
            }

            return null;
         }
View Full Code Here

Examples of opennlp.maxent.GISModel.eval()

      List<String> features = fe.getFeatures(entity);
      String type = entity.getType();
      if(modelsByType.containsKey(type)) {
        GISModel model = modelsByType.get(type);
        if(model.getNumOutcomes() == 2) {
          double prob = model.eval(features.toArray(new String[0]))[model.getIndex("T")];
          entity.setConfidence(prob);
        }
      }
    }
  }
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.