Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKBJavaConnector/ECJClient/src/ec/app/lawnmower/func/Progn2.java @ 12147

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

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

File size: 1.4 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.lawnmower.func;
9import ec.*;
10import ec.gp.*;
11import ec.util.*;
12
13/*
14 * Progn2.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 Progn2 extends GPNode
26    {
27    public String toString() { return "progn2"; }
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!=2)
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 both children.  Return the second one (done automagically).
49        children[0].eval(state,thread,input,stack,individual,problem);
50        children[1].eval(state,thread,input,stack,individual,problem);
51        }
52    }
53
54
55
Note: See TracBrowser for help on using the repository browser.