|
eaLib API Docs Last Modified : January 7 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mss.ea.core.GeneticOperator | +--mss.ea.ins.Reinsertion
Abstract base class for the reinsertion operator. Make sure to read the descriptions of generation gap and reinsertion rate. These two values define, whether a population grows or shrinks.
Field Summary | |
protected IndividualGate |
gate
Gate to insert individuals into. |
protected float |
generationGap
Generation Gap. |
protected Individual[] |
pool
Pool with individuals that could be inserted into the population. |
protected float |
reinsertionRate
Reinsertion Rate. |
Fields inherited from class mss.ea.core.GeneticOperator |
description, ID, name |
Constructor Summary | |
Reinsertion(float genGap,
float insRate)
Constructor with reinsertion parameters. |
|
Reinsertion(IndividualGate gate)
Constructor with population. |
|
Reinsertion(IndividualGate gate,
float genGap,
float insRate)
Constructor with population and reinsertion parameters. |
Method Summary | |
abstract boolean |
filter(Individual i)
Executes the internal filter on the given individual. |
IndividualStream |
filter(IndividualStream is)
Filters the whole individual stream. |
float |
getGap()
Gets the value of the generation gap. |
int |
getGapSize()
Gets the number of individuals to be replaced. |
float |
getRate()
Gets the value of the reinsertion rate. |
int |
getRateSize(Individual[] ia)
Gets the number of indivdiuals to be inserted. |
int |
getRateSize(IndividualStream is)
Gets the number of individuals to be inserted. |
int |
getRateSize(java.util.Vector iv)
Gets the number of indivdiuals to be inserted. |
abstract IndividualStream |
reinsert(IndividualStream is)
Performs the reinsertion with the given individual stream. |
void |
setGap(float gap)
Sets the generation gap. |
void |
setGate(IndividualGate gate)
Sets a new gate for the filter. |
void |
setRate(float rate)
Sets the reinsertion rate. |
Methods inherited from class mss.ea.core.GeneticOperator |
getDescription, getID, getName, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected IndividualGate gate
protected Individual[] pool
protected float generationGap
protected float reinsertionRate
Constructor Detail |
public Reinsertion(IndividualGate gate)
gate
- gate the individuals are inserted intopublic Reinsertion(float genGap, float insRate)
genGap
- generation gapinsRate
- reinsertion ratepublic Reinsertion(IndividualGate gate, float genGap, float insRate)
gate
- gate the individuals are inserted intogenGap
- generation gapinsRate
- reinsertion rateMethod Detail |
public float getGap()
public float getRate()
public void setGap(float gap)
gap
- new value of generation gappublic void setRate(float rate)
rate
- new value of reinsertion ratepublic int getGapSize()
public int getRateSize(Individual[] ia)
public int getRateSize(java.util.Vector iv)
public int getRateSize(IndividualStream is)
public void setGate(IndividualGate gate)
setGate
in interface IndividualFilter
gate
- new gate for this filterpublic abstract IndividualStream reinsert(IndividualStream is) throws ReinsertionException
is
- stream of individuals to be insertedReinsertionException
- thrown if the reinsertion failspublic abstract boolean filter(Individual i)
filter
in interface IndividualFilter
i
- individual to check for insertionpublic IndividualStream filter(IndividualStream is)
filter
in interface IndividualFilter
is
- individual stream to filter
|
eaLib API Docs Last Modified : January 7 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |