public abstract class GPProblem extends Problem implements SimpleProblemForm
Parameters
base.stack classname, inherits or = ec.ADFStack |
(the class for the GPProblem's ADF Stack) |
base.data classname, inherits and != ec.GPData |
(the class for the GPProblem's basic GPData type) |
Default Base
gp.problem
Parameter bases
base.stack | (stack) |
base.data | (data) |
Modifier and Type | Field and Description |
---|---|
GPData |
input
The GPProblem's GPData
|
static java.lang.String |
P_DATA |
static java.lang.String |
P_GPPROBLEM |
static java.lang.String |
P_STACK |
ADFStack |
stack
The GPProblem's stack
|
Constructor and Description |
---|
GPProblem() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates a new individual cloned from a prototype,
and suitable to begin use in its own evolutionary
context.
|
Parameter |
defaultBase()
GPProblem defines a default base so your subclass doesn't
absolutely have to.
|
void |
setup(EvolutionState state,
Parameter base)
Sets up the object by reading it from the parameters stored
in state, built off of the parameter base base.
|
canEvaluate, closeContacts, describe, describe, finishEvaluating, initializeContacts, prepareToEvaluate, reinitializeContacts
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
describe, evaluate
public static final java.lang.String P_GPPROBLEM
public static final java.lang.String P_STACK
public static final java.lang.String P_DATA
public ADFStack stack
public GPData input
public Parameter defaultBase()
defaultBase
in interface Prototype
defaultBase
in class Problem
public void setup(EvolutionState state, Parameter base)
Prototype
For prototypes, setup(...) is typically called once for the prototype instance; cloned instances do not receive the setup(...) call. setup(...) may be called more than once; the only guarantee is that it will get called at least once on an instance or some "parent" object from which it was ultimately cloned.
public java.lang.Object clone()
Prototype
Typically this should be a full "deep" clone. However, you may share certain elements with other objects rather than clone hem, depending on the situation:
Implementations.
public Object clone()
{
try
{
return super.clone();
}
catch ((CloneNotSupportedException e)
{ throw new InternalError(); } // never happens
}
public Object clone()
{
try
{
MyObject myobj = (MyObject) (super.clone());
// put your deep-cloning code here...
}
catch ((CloneNotSupportedException e)
{ throw new InternalError(); } // never happens
return myobj;
}
public Object clone()
{
MyObject myobj = (MyObject) (super.clone());
// put your deep-cloning code here...
return myobj;
}