public class NK extends Problem implements SimpleProblemForm
Parameters
| base.k int >= 0 && < 31 |
(number of interacting alleles) |
| base.adjacent boolean |
(should interacting alleles be adjacent to the given allele) |
| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
adjacentNeighborhoods |
(package private) int |
k |
(package private) HashMap |
oldValues |
static String |
P_ADJACENT |
static String |
P_K |
static String |
P_N |
| Constructor and Description |
|---|
NK() |
| Modifier and Type | Method and Description |
|---|---|
void |
evaluate(EvolutionState state,
Individual ind,
int subpopulation,
int threadnum)
Evaluates the individual in ind, if necessary (perhaps
not evaluating them if their evaluated flags are true),
and sets their fitness appropriately.
|
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, clone, closeContacts, defaultBase, describe, describe, finishEvaluating, initializeContacts, prepareToEvaluate, reinitializeContactsequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdescribepublic static final String P_N
public static final String P_K
public static final String P_ADJACENT
int k
boolean adjacentNeighborhoods
HashMap oldValues
public void setup(EvolutionState state, Parameter base)
PrototypeFor 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 void evaluate(EvolutionState state, Individual ind, int subpopulation, int threadnum)
SimpleProblemFormevaluate in interface SimpleProblemFormCopyright © 2014 Evolutionary Computation Laboratory at George Mason University. All rights reserved.