Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKBJavaConnector/ECJClient/src/ec/app/ant/func/Progn3.java @ 10216

Last change on this file since 10216 was 6152, checked in by bfarka, 14 years ago

added ecj and custom statistics to communicate with the okb services #1441

File size: 2.0 KB
Line 
1/*
2  Copyright 2006 by Sean Luke
3  Licensed under the Academic Free License version 3.0
4  See the file "LICENSE" for more information
5*/
6
7
8package ec.app.ant.func;
9import ec.*;
10import ec.gp.*;
11import ec.util.*;
12
13/*
14 * Progn3.java
15 *
16 * Created: Wed Nov  3 18:26:37 1999
17 * By: Sean Luke
18 */
19
20/**
21 * @author Sean Luke
22 * @version 1.0
23 */
24
25public class Progn3 extends GPNode implements EvalPrint
26    {
27    public String toString() { return "progn3"; }
28
29    public void checkConstraints(final EvolutionState state,
30        final int tree,
31        final GPIndividual typicalIndividual,
32        final Parameter individualBase)
33        {
34        super.checkConstraints(state,tree,typicalIndividual,individualBase);
35        if (children.length!=3)
36            state.output.error("Incorrect number of children for node " +
37                toStringForError() + " at " +
38                individualBase);
39        }
40
41    public void eval(final EvolutionState state,
42        final int thread,
43        final GPData input,
44        final ADFStack stack,
45        final GPIndividual individual,
46        final Problem problem)
47        {
48        // Evaluate children.  Easy as cake.
49        children[0].eval(state,thread,input,stack,individual,problem);
50        children[1].eval(state,thread,input,stack,individual,problem);
51        children[2].eval(state,thread,input,stack,individual,problem);
52        }
53
54    public void evalPrint(final EvolutionState state,
55        final int thread,
56        final GPData input,
57        final ADFStack stack,
58        final GPIndividual individual,
59        final Problem problem,
60        final int[][] map2)
61        {
62        // Evaluate children.  Easy as cake.
63        ((EvalPrint)children[0]).evalPrint(state,thread,input,stack,individual,problem,map2);
64        ((EvalPrint)children[1]).evalPrint(state,thread,input,stack,individual,problem,map2);
65        ((EvalPrint)children[2]).evalPrint(state,thread,input,stack,individual,problem,map2);
66        }
67    }
68
69
70
Note: See TracBrowser for help on using the repository browser.