|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectOperator.Operations.RandomInitialiser
public class RandomInitialiser
Create an Individual with a randomly generated chromosome
Field Summary | |
---|---|
protected GEGrammar |
grammar
|
protected int |
initChromSize
|
protected RandomNumberGenerator |
rng
|
Constructor Summary | |
---|---|
RandomInitialiser(RandomNumberGenerator rng,
GEGrammar g,
int initChromSize)
New instance |
|
RandomInitialiser(RandomNumberGenerator rng,
GEGrammar g,
java.util.Properties p)
New instance |
Method Summary | |
---|---|
Individual |
createIndividual()
Creates an Individual |
void |
doOperation(Individual operand)
Set an integer chromsome of initChromSize filled with random integers in the incoming individual. |
void |
doOperation(java.util.List<Individual> operands)
Calls doOperation(Individual operand) |
RandomNumberGenerator |
getRNG()
Get the number generator |
void |
setProperties(java.util.Properties p)
Set properties |
void |
setRNG(RandomNumberGenerator rng)
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 RandomNumberGenerator rng
protected GEGrammar grammar
protected int initChromSize
Constructor Detail |
---|
public RandomInitialiser(RandomNumberGenerator rng, GEGrammar g, int initChromSize)
rng
- random number generatorg
- grammatical evolution grammarinitChromSize
- initial input size (Chromosome length)public RandomInitialiser(RandomNumberGenerator rng, GEGrammar g, java.util.Properties p)
rng
- random number generatorg
- grammatical evolution grammarp
- propertiesMethod Detail |
---|
public void setProperties(java.util.Properties p)
ParameterI
setProperties
in interface ParameterI
p
- object containing propertiespublic RandomNumberGenerator getRNG()
Stochastic
getRNG
in interface Stochastic
public void setRNG(RandomNumberGenerator rng)
Stochastic
setRNG
in interface Stochastic
rng
- number generatorpublic Individual createIndividual()
createIndividual
in interface CreationOperation
public void doOperation(Individual operand)
doOperation
in interface Operation
operand
- Individual to get the new chromosomepublic void doOperation(java.util.List<Individual> operands)
doOperation
in interface Operation
operands
- list of individuals
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |