Example #1
0
  /**
   * Evaluates this node.
   *
   * @param state Evolution state (current)
   * @param thread Thread number
   * @param input GPData storage object
   * @param stack ADF stack
   * @param individual Current individual
   * @param problem GP problem object
   */
  public void eval(
      final EvolutionState state,
      final int thread,
      final GPData input,
      final ADFStack stack,
      final GPIndividual individual,
      final Problem problem) {

    AbstractTexture t1;

    Data rd = ((Data) (input));

    children[0].eval(state, thread, input, stack, individual, problem);
    double r = rd.resultd;

    children[1].eval(state, thread, input, stack, individual, problem);
    t1 = rd.texture;

    rd.texture = new FurClass(r, new Fur(t1));
  };
Example #2
0
  /**
   * Evaluates this node.
   *
   * @param state Evolution state (current)
   * @param thread Thread number
   * @param input GPData storage object
   * @param stack ADF stack
   * @param individual Current individual
   * @param problem GP problem object
   */
  public void eval(
      final EvolutionState state,
      final int thread,
      final GPData input,
      final ADFStack stack,
      final GPIndividual individual,
      final Problem problem) {

    double x = param.Parameters.PROBLEM.currentX;
    double y = param.Parameters.PROBLEM.currentY;

    AbstractTexture t;
    RGBAColor c = new RGBAColor();

    Data rd = ((Data) (input));

    children[0].eval(state, thread, input, stack, individual, problem);
    t = rd.texture;

    t.getColor(x, y, c);

    rd.color = new Color(c.getRed(), c.getGreen(), c.getBlue());
  };