@Override
    public double apply(Variable v) {
      double r = v.get(VN.r);
      double s = v.get(VN.s);
      double t = v.get(VN.t);

      return (vt[funIndex][0] * r + 1.0)
          * (vt[funIndex][1] * s + 1.0)
          * (vt[funIndex][2] * t + 1.0)
          / 8.0;
    }
    @Override
    public double apply(Variable v) {
      double r = v.get(VN.r);
      double s = v.get(VN.s);
      double t = v.get(VN.t);

      double cr = vt[funIndex][0];
      double cs = vt[funIndex][1];
      double ct = vt[funIndex][2];

      if ("r".equals(var)) return cr * (cs * s + 1.0) * (ct * t + 1.0) / 8.0;
      else if ("s".equals(var)) return (cr * r + 1.0) * cs * (ct * t + 1.0) / 8.0;
      else if ("t".equals(var)) return (cr * r + 1.0) * (cs * s + 1.0) * ct / 8.0;
      else throw new FutureyeException("");
    }
 @Override
 public double value(Variable v) {
   double x = v.get("x");
   double y = v.get("y");
   if (Math.sqrt(x * x + y * y) < 0.5) return 1.0;
   else return 8.0;
 }
 @Override
 public double value(Variable v) {
   double x = v.get("x");
   double y = v.get("y");
   return (x * x + y * y) / 8.0 + 7.0 / 32.0;
 }
Esempio n. 5
0
 @Override
 public double apply(Variable v) {
   return v.get(varNames[funIndex]);
 }