Examples of calculate()


Examples of com.mdraco.calculator.Operation.calculate()

          throw new UnsupportedOperationException("missing operation");
        if (values.isEmpty())
          throw new UnsupportedOperationException("missing value");

        Operation operation = operations.pop();
        result = operation.calculate(values.pop(), result);
      }
    }
    if (!operations.isEmpty())
      throw new UnsupportedOperationException("wrong number of arguments");
    return result;
View Full Code Here

Examples of com.pointcliki.dizgruntled.utils.PathFinder.calculate()

    fGrunt.state(GruntState.MOVING);
  }

  public boolean start() {
    PathFinder finder = new PathFinder(fGrunt.levelScene());
    fPath = finder.calculate(fGrunt.getTile(), fTarget, 1000);
    fPathIndex = 1;
    return fPath != null;
  }
}
View Full Code Here

Examples of de.congrace.exp4j.Calculable.calculate()

       
        for (Double p : points)
        {
            Calculable calc = new ExpressionBuilder(equation.getEquation()).withVariable(
                    String.valueOf(equation.getIndependentVariable()), p).build();
            results.add(calc.calculate());
        }
       
        return new Solution(results, 0, 10, 1);
    }
}
View Full Code Here

Examples of easyliq.Calculators.Calculator.Calculate()

                calcParams.addUnknown(p);
            } else {
                calcParams.addKnown(p, Double.parseDouble(parStr));
            }
        }
        calculator.Calculate(calcParams);

        response.setContentType("application/json");
        response.setCharacterEncoding("UTF-8");
        String json = "{";
        boolean isFirst = true;
View Full Code Here

Examples of edu.brown.mappings.PearsonCorrelationMapping.calculate()

    /**
     * testNoSamples
     */
    public void testNoSamples() {
        PearsonCorrelationMapping p = new PearsonCorrelationMapping();
        assertNull(p.calculate());
    }
   
    /**
     * testClear
     */
 
View Full Code Here

Examples of edu.brown.mappings.RatioMapping.calculate()

    /**
     * testNoSamples
     */
    public void testNoSamples() {
        RatioMapping p = new RatioMapping();
        assertNull(p.calculate());
    }
   
    /**
     * testClear
     */
 
View Full Code Here

Examples of freenet.node.NodeStats.RunningRequestsSnapshot.calculate()

      return new IncomingLoadSummaryStats(runningRequests.totalRequests(),
          loadStats.outputBandwidthPeerLimit, loadStats.inputBandwidthPeerLimit,
          loadStats.outputBandwidthUpperLimit, loadStats.inputBandwidthUpperLimit,
          runningRequests.calculate(ignoreLocalVsRemoteBandwidthLiability, false),
          runningRequests.calculate(ignoreLocalVsRemoteBandwidthLiability, true),
          otherRunningRequests.calculate(ignoreLocalVsRemoteBandwidthLiability, false),
          otherRunningRequests.calculate(ignoreLocalVsRemoteBandwidthLiability, true));
    }
   
    /** Can we route the tag to this peer? If so (including if we are accepting because
     * we don't have any load stats), and we haven't already, addRoutedTo() and return
View Full Code Here

Examples of jodd.proxetta.data.Calc.calculate()

    Calc newCalc = DelegateAdviceUtil.applyAdvice(CalcImpl.class);
    DelegateAdviceUtil.injectTargetIntoProxy(newCalc, calc);

    assertNotEquals(newCalc.getClass(), calc.getClass());

    assertEquals(calc.calculate(2, 8), newCalc.calculate(2, 8));
    assertEquals(calc.calculate(2L, 8L), newCalc.calculate(2L, 8L));
    assertEquals(calc.calculate(2.5d, 8.5d), newCalc.calculate(2.5d, 8.5d), 0.1);
    assertEquals(calc.calculate(2.5f, 8.5f), newCalc.calculate(2.5f, 8.5f), 0.1);
    assertEquals(calc.calculate((byte)2, (byte)8), newCalc.calculate((byte)2, (byte)8));
    assertEquals(calc.calculate((short)2, (short)8), newCalc.calculate((short)2, (short)8));
View Full Code Here

Examples of jodd.proxetta.data.CalcImpl.calculate()

    Calc newCalc = DelegateAdviceUtil.applyAdvice(CalcImpl.class);
    DelegateAdviceUtil.injectTargetIntoProxy(newCalc, calc);

    assertNotEquals(newCalc.getClass(), calc.getClass());

    assertEquals(calc.calculate(2, 8), newCalc.calculate(2, 8));
    assertEquals(calc.calculate(2L, 8L), newCalc.calculate(2L, 8L));
    assertEquals(calc.calculate(2.5d, 8.5d), newCalc.calculate(2.5d, 8.5d), 0.1);
    assertEquals(calc.calculate(2.5f, 8.5f), newCalc.calculate(2.5f, 8.5f), 0.1);
    assertEquals(calc.calculate((byte)2, (byte)8), newCalc.calculate((byte)2, (byte)8));
    assertEquals(calc.calculate((short)2, (short)8), newCalc.calculate((short)2, (short)8));
View Full Code Here

Examples of mage.abilities.dynamicvalue.DynamicValue.calculate()

    }

    @Override
    public boolean apply(Game game, Ability source) {
        DynamicValue value = new MultikickerCount();
        int damage = value.calculate(game, source, this) * 2;

        Player player = game.getPlayer(source.getFirstTarget());
        if (player != null) {
            player.damage(damage, id, game, false, true);
            return true;
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.