Examples of calc()


Examples of bouncingballs.BouncingBalls.Ball.calc()

    background(255);

    // move and draw all the balls
    for (int i = 0; i < balls.size(); i++) {
      Ball ball = (Ball) balls.get(i);
      ball.calc();
      if (client.isOnScreen(ball.x - ball.d / 2, ball.y - ball.d / 2,
          ball.d, ball.d)) {
        ball.draw();
      }
    }
View Full Code Here

Examples of com.greentea.relaxation.jnmf.lib.functions.IFunction.calc()

         for (int i = 0; i < neuronSteps.size(); ++i)
         {
            NeuronStepInfo outputNeuronStepInfo = neuronSteps.get(i);
            NeuronStepInfo candidateStepInfo = candidateSteps.get(i);
            e += Math.pow(func.calc(outputNeuronStepInfo.net + candidateStepInfo.activation * w) -
                    outputNeuronStepInfo.targetValue, 2);
         }
      }

      return e / (2 * pCount);
 
View Full Code Here

Examples of com.greentea.relaxation.jnmf.lib.functions.IFunction.calc()

   public void collectInfoFromOutput(Neuron outputNeuron, double targetValue)
   {
      double net = outputNeuron.getNet();
      double act = outputNeuron.getActivation();
      IFunction deriviative = outputNeuron.getActivationFunction().getDerivative();
      double e = (act - targetValue) * deriviative.calc(net);

      NeuronStepInfo neuronStepInfo = new NeuronStepInfo(act, e, net, targetValue);
      addOutputNeuronInfo(outputNeuron, neuronStepInfo);
   }

View Full Code Here

Examples of com.greentea.relaxation.jnmf.lib.functions.IFunction.calc()

               double avE = calcAvE(outputInfo);

               NeuronStepInfo stepPInfo = outputInfo.get(p);
               IFunction deriviative = candidateNeuron.getActivationFunction().getDerivative();
               sigmaP += Math.signum(calcCj(j, candidateNeuron)) * (stepPInfo.e - avE) *
                       deriviative.calc(candidateInfo.get(p).net);
            }

            sigmas.add(sigmaP);
         }

View Full Code Here

Examples of com.greentea.relaxation.jnmf.lib.functions.IFunction.calc()

   private double calcSigma(Neuron neuron, double target)
   {
      double net = neuron.getNet();
      IFunction derivative = neuron.getActivationFunction().getDerivative();
      double currentSigma = derivative.calc(net);

      if (neuron.getOutputSynapses().size() == 0)
      {
         // neuron is in last layer
         currentSigma *= (target - neuron.getActivation());
View Full Code Here

Examples of com.greentea.relaxation.jnmf.lib.functions.IFunction.calc()

         double activation = neuron.getActivation();
         double e = calcError(targetValues.get(i), activation);
         double net = neuron.getNet();

         IFunction deriviative = neuron.getActivationFunction().getDerivative();
         double deriviativeValue = deriviative.calc(net);

         for (Synapse s : neuron.getInputSynapses())
         {
            slopes.put(s, getSlope(s) + (e * deriviativeValue * s.getSource().getActivation()));
         }
View Full Code Here

Examples of com.greentea.relaxation.jnmf.lib.functions.VarSigmoidFunction.calc()

            double averageValue = (Double) row.get(row.size() - 1);

            for (int i = 1; i < averageElementIndex; ++i)
            {
               double value = (Double) row.get(i);
               double info = f.calc(value);

               row.add(JNMFMathUtils.roundDouble4(info));
            }

            double info = f.calc(averageValue);
View Full Code Here

Examples of com.greentea.relaxation.jnmf.lib.functions.VarSigmoidFunction.calc()

               double info = f.calc(value);

               row.add(JNMFMathUtils.roundDouble4(info));
            }

            double info = f.calc(averageValue);

            row.add(JNMFMathUtils.roundDouble4(info));
            row.add(JNMFMathUtils.roundDouble4(Math.abs(info)));

            selfDescriptiveness.add(Math.abs(info));
View Full Code Here

Examples of com.l2jfrozen.gameserver.skills.Calculator.calc()

    env.skill = skill;
    env.value = init;
    env.baseValue = init;

    // Launch the calculation
    c.calc(env);
    // avoid some troubles with negative stats (some stats should never be
    // negative)
    if(env.value <= 0)
    {
      switch(stat)
View Full Code Here

Examples of l2p.gameserver.skills.Calculator.calc()

    Env env = new Env();
    env.character = this;
    env.target = object;
    env.skill = skill;
    env.value = init;
    c.calc(env);
    return env.value;
  }

  public final double calcStat(Stats stat, L2Character object, L2Skill skill)
  {
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.