Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKBJavaConnector/ECJClient/src/ec/app/tutorial4/Y.java @ 6152

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

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

File size: 1.1 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.tutorial4;
9import ec.*;
10import ec.gp.*;
11import ec.util.*;
12
13public class Y extends GPNode
14    {
15    public String toString() { return "y"; }
16
17    public void checkConstraints(final EvolutionState state,
18        final int tree,
19        final GPIndividual typicalIndividual,
20        final Parameter individualBase)
21        {
22        super.checkConstraints(state,tree,typicalIndividual,individualBase);
23        if (children.length!=0)
24            state.output.error("Incorrect number of children for node " +
25                toStringForError() + " at " +
26                individualBase);
27        }
28
29    public void eval(final EvolutionState state,
30        final int thread,
31        final GPData input,
32        final ADFStack stack,
33        final GPIndividual individual,
34        final Problem problem)
35        {
36        DoubleData rd = ((DoubleData)(input));
37        rd.x = ((MultiValuedRegression)problem).currentY;
38        }
39    }
40
Note: See TracBrowser for help on using the repository browser.