|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectOperator.Operations.GrowInitialiser
public class GrowInitialiser
Class for growing individuals to the maximum derrivationTree size of maxDepth
Field Summary | |
---|---|
protected GEChromosome |
chromosome
|
protected Genotype |
genotype
|
protected GEGrammar |
grammar
|
protected int |
initChromSize
|
protected int |
maxDepth
|
protected int |
minDepth
|
protected RandomNumberGenerator |
rng
|
Constructor Summary | |
---|---|
GrowInitialiser(RandomNumberGenerator rng,
GEGrammar gegrammar,
int maxDepth)
New instance |
|
GrowInitialiser(RandomNumberGenerator rng,
GEGrammar gegrammar,
java.util.Properties p)
New instance |
Method Summary | |
---|---|
protected boolean |
checkGECodonValue(NimbleTree<Symbol> dt)
Check if it is a GECodonValue. |
Individual |
createIndividual()
Creates an Individuals |
void |
doOperation(Individual operand)
Performs the operation on an operand |
void |
doOperation(java.util.List<Individual> operands)
Performs the operation on the list passed |
Genotype |
getGenotype(int maxLength)
Creates a genotype by building a tree to the most maxDepth for one branch. |
int |
getMaxDepth()
Get max depth of tree |
int |
getMinDepth()
Get minimum depth of tree |
java.util.ArrayList<java.lang.Integer> |
getPossibleRules(NimbleTree<Symbol> dt,
Rule rule)
|
RandomNumberGenerator |
getRNG()
Get the number generator |
boolean |
grow(NimbleTree<Symbol> dt)
Recursively builds a tree. |
void |
setMaxDepth(int i)
Set maximum depth of tree |
void |
setMinDepth(int minDepth)
Set minimum depth |
void |
setProperties(java.util.Properties p)
Set properties |
void |
setRNG(RandomNumberGenerator m)
Set the number generator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Genotype genotype
protected GEChromosome chromosome
protected RandomNumberGenerator rng
protected int maxDepth
protected int minDepth
protected GEGrammar grammar
protected int initChromSize
Constructor Detail |
---|
public GrowInitialiser(RandomNumberGenerator rng, GEGrammar gegrammar, int maxDepth)
rng
- random number generatorgegrammar
- grammatical evolution grammarmaxDepth
- max growth depth of treepublic GrowInitialiser(RandomNumberGenerator rng, GEGrammar gegrammar, java.util.Properties p)
rng
- random number generatorgegrammar
- grammatical evolution grammarp
- propertiesMethod Detail |
---|
public void setRNG(RandomNumberGenerator m)
Stochastic
setRNG
in interface Stochastic
m
- number generatorpublic RandomNumberGenerator getRNG()
Stochastic
getRNG
in interface Stochastic
public void setProperties(java.util.Properties p)
ParameterI
setProperties
in interface ParameterI
p
- object containing propertiespublic Individual createIndividual()
createIndividual
in interface CreationOperation
public int getMinDepth()
public void setMinDepth(int minDepth)
minDepth
- minumum depthpublic void setMaxDepth(int i)
i
- max depthpublic int getMaxDepth()
public void doOperation(Individual operand)
Operation
doOperation
in interface Operation
operand
- operand to perform operation onpublic void doOperation(java.util.List<Individual> operands)
Operation
doOperation
in interface Operation
operands
- operands to be operated onpublic Genotype getGenotype(int maxLength)
public boolean grow(NimbleTree<Symbol> dt)
dt
- Tree to grow on
public java.util.ArrayList<java.lang.Integer> getPossibleRules(NimbleTree<Symbol> dt, Rule rule)
protected boolean checkGECodonValue(NimbleTree<Symbol> dt)
dt
- tree
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |