|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.Problem
ec.gp.GPProblem
ec.app.edge.Edge
public class Edge
Edge implements the Symbolic Edge problem.
Parameters
base.data classname, inherits or == ec.app.edge.EdgeData |
(the class for the prototypical GPData object for the Edge problem) |
Parameter bases
base.data | species (the GPData object) |
Field Summary | |
---|---|
boolean[] |
accept
|
static int |
BAD
|
int[][] |
epsilon
|
static int |
EPSILON
|
int[] |
epsilon_l
|
int[] |
from
|
boolean |
generalize
|
EdgeData |
input
|
static int |
J_CENTER
|
static int |
J_LEFT
|
static int |
J_RIGHT
|
static int |
MIN_ARRAY_SIZE
|
boolean[][] |
negA
|
boolean[][] |
negT
|
int |
numEdges
|
int |
numNodes
|
static java.lang.String |
P_ALLNEG
|
static java.lang.String |
P_ALLPOS
|
static java.lang.String |
P_GENERALIZE
|
static java.lang.String |
P_MAXTEST
|
static java.lang.String |
P_TESTNEG
|
static java.lang.String |
P_TESTPOS
|
boolean[][] |
posA
|
boolean[][] |
posT
|
int[] |
reading
|
int[][] |
reading0
|
static int |
READING0
|
int[] |
reading0_l
|
int[][] |
reading1
|
static int |
READING1
|
int[] |
reading1_l
|
boolean[] |
start
|
boolean[] |
state1
|
boolean[] |
state2
|
int[] |
to
|
Fields inherited from class ec.gp.GPProblem |
---|
data, P_DATA, P_GPPROBLEM, P_STACK, stack |
Fields inherited from class ec.Problem |
---|
P_PROBLEM |
Constructor Summary | |
---|---|
Edge()
|
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates a new individual cloned from a prototype, and suitable to begin use in its own evolutionary context. |
void |
describe(Individual ind,
EvolutionState state,
int threadnum,
int log,
int verbosity)
|
java.lang.String |
describeShortGeneralized(Individual ind,
EvolutionState state,
int threadnum)
|
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. |
static java.lang.String |
fill(int num,
char c)
|
void |
fullTest(EvolutionState state,
Individual ind,
int threadnum,
boolean[][] pos,
boolean[][] neg)
Tests an individual, returning its successful positives in totpos and its successful negatives in totneg. |
static java.lang.String |
justify(java.lang.String s,
int len,
int justification)
|
void |
printBits(EvolutionState state,
boolean[][] bits)
|
java.lang.String |
printCurrentNFA()
|
boolean[][] |
restrictToSize(int size,
boolean[][] cases,
EvolutionState state,
int thread)
|
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. |
boolean[][] |
slurp(java.io.File f)
|
boolean |
test(boolean[] sample)
|
Methods inherited from class ec.gp.GPProblem |
---|
defaultBase, describe |
Methods inherited from class ec.Problem |
---|
canEvaluate, closeContacts, evaluate, finishEvaluating, getBase, initializeContacts, prepareToEvaluate, reinitializeContacts, setBase |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ec.simple.SimpleProblemForm |
---|
canEvaluate, describe, evaluate |
Field Detail |
---|
public static final java.lang.String P_GENERALIZE
public static final java.lang.String P_ALLPOS
public static final java.lang.String P_ALLNEG
public static final java.lang.String P_TESTPOS
public static final java.lang.String P_TESTNEG
public static final java.lang.String P_MAXTEST
public static final int MIN_ARRAY_SIZE
public static final int BAD
public static final int READING0
public static final int READING1
public static final int EPSILON
public EdgeData input
public boolean[] start
public boolean[] accept
public int numNodes
public int[] from
public int[] to
public int[] reading
public int numEdges
public int[][] reading1
public int[] reading1_l
public int[][] reading0
public int[] reading0_l
public int[][] epsilon
public int[] epsilon_l
public boolean[][] posT
public boolean[][] negT
public boolean[][] posA
public boolean[][] negA
public boolean[] state1
public boolean[] state2
public boolean generalize
public static final int J_LEFT
public static final int J_RIGHT
public static final int J_CENTER
Constructor Detail |
---|
public Edge()
Method Detail |
---|
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;
}
clone
in interface Prototype
clone
in class GPProblem
public static java.lang.String fill(int num, char c)
public static java.lang.String justify(java.lang.String s, int len, int justification)
public java.lang.String printCurrentNFA()
public boolean[][] restrictToSize(int size, boolean[][] cases, EvolutionState state, int thread)
public boolean[][] slurp(java.io.File f) throws java.io.IOException
java.io.IOException
public void printBits(EvolutionState state, boolean[][] bits)
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.
setup
in interface Prototype
setup
in interface Setup
setup
in class GPProblem
public boolean test(boolean[] sample)
public void fullTest(EvolutionState state, Individual ind, int threadnum, boolean[][] pos, boolean[][] neg)
public void evaluate(EvolutionState state, Individual ind, int subpopulation, int threadnum)
SimpleProblemForm
evaluate
in interface SimpleProblemForm
evaluate
in class Problem
public void describe(Individual ind, EvolutionState state, int threadnum, int log, int verbosity)
describe
in interface SimpleProblemForm
describe
in class Problem
public java.lang.String describeShortGeneralized(Individual ind, EvolutionState state, int threadnum)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |