ac.essex.ooechs.ecj.ecj2java.example.problems
Class MathsProblem
java.lang.Object
ec.Problem
ec.gp.GPProblem
ac.essex.ooechs.ecj.ecj2java.example.problems.MathsProblem
- All Implemented Interfaces:
- ec.Prototype, ec.Setup, ec.simple.SimpleProblemForm, java.io.Serializable, java.lang.Cloneable
public class MathsProblem
- extends ec.gp.GPProblem
- implements ec.simple.SimpleProblemForm
Uses GP to solve simple maths problems.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version,
provided that any use properly credits the author.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details at http://www.gnu.org
- Version:
- 1.0
- Author:
- Olly Oechsle, University of Essex, Date: 05-Sep-2006
- See Also:
- Serialized Form
Fields inherited from class ec.gp.GPProblem |
data, P_DATA, P_GPPROBLEM, P_STACK, stack |
Fields inherited from class ec.Problem |
P_PROBLEM |
Method Summary |
void |
describe(ec.Individual ind,
ec.EvolutionState state,
int threadnum,
int log,
int verbosity)
|
void |
evaluate(ec.EvolutionState state,
ec.Individual ind,
int threadnum)
|
boolean |
isSimilarTo(double number1,
double number2,
double threshold)
|
java.lang.Object |
protoClone()
|
void |
setup(ec.EvolutionState state,
ec.util.Parameter base)
|
Methods inherited from class ec.gp.GPProblem |
defaultBase, protoCloneSimple |
Methods inherited from class ec.Problem |
closeContacts, finishEvaluating, initializeContacts, prepareToEvaluate, reinitializeContacts |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
input
public DoubleData input
x
public double x
counter
static int counter
MathsProblem
public MathsProblem()
protoClone
public java.lang.Object protoClone()
throws java.lang.CloneNotSupportedException
- Specified by:
protoClone
in interface ec.Prototype
- Overrides:
protoClone
in class ec.gp.GPProblem
- Throws:
java.lang.CloneNotSupportedException
setup
public void setup(ec.EvolutionState state,
ec.util.Parameter base)
- Specified by:
setup
in interface ec.Prototype
- Specified by:
setup
in interface ec.Setup
- Overrides:
setup
in class ec.gp.GPProblem
evaluate
public void evaluate(ec.EvolutionState state,
ec.Individual ind,
int threadnum)
- Specified by:
evaluate
in interface ec.simple.SimpleProblemForm
isSimilarTo
public boolean isSimilarTo(double number1,
double number2,
double threshold)
describe
public void describe(ec.Individual ind,
ec.EvolutionState state,
int threadnum,
int log,
int verbosity)
- Specified by:
describe
in interface ec.simple.SimpleProblemForm
- Overrides:
describe
in class ec.gp.GPProblem