|
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 | +--mss.ea.ins.DiscreteReinsertion
Discrete reinsertion.
This operator works in the same way as EliteReinsertion
with the difference that discrete values for
generation gap and reinsertion rate instead of percentage values can be given.
Field Summary | |
protected int |
gapSize
Number of individuals to be deleted from the population. |
protected int |
rateSize
Number of individuals to inserted from the reinsertion pool. |
Fields inherited from class mss.ea.ins.Reinsertion |
gate, generationGap, pool, reinsertionRate |
Fields inherited from class mss.ea.core.GeneticOperator |
description, ID, name |
Constructor Summary | |
DiscreteReinsertion(IndividualGate gate)
Constructor with individual gate. |
|
DiscreteReinsertion(IndividualGate gate,
int gap,
int rate)
Constructor with individual gate and insertion parameters. |
|
DiscreteReinsertion(int gap,
int rate)
Constructor with insertion parameters. |
Method Summary | |
boolean |
filter(Individual i)
Executes the internal filter on the given individual. |
int |
getGapSize()
Gets the number of individuals to be removed. |
int |
getRateSize()
Gets the number of individuals to be inserted. |
IndividualStream |
reinsert(IndividualStream is)
Filters the individual stream. |
void |
setGapSize(int size)
Sets the number of individuals to be removed. |
void |
setRateSize(int size)
Sets the number of individuals to be inserted. |
Methods inherited from class mss.ea.ins.Reinsertion |
filter, getGap, getRate, getRateSize, getRateSize, getRateSize, setGap, setGate, setRate |
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 int gapSize
protected int rateSize
Constructor Detail |
public DiscreteReinsertion(IndividualGate gate)
gate
- individual gate for insertionpublic DiscreteReinsertion(int gap, int rate)
gap
- number of individuals to be removedrate
- number of individuals to insertedpublic DiscreteReinsertion(IndividualGate gate, int gap, int rate)
gate
- individual gate for insertiongap
- number of individuals to be removedrate
- number of individuals to insertedMethod Detail |
public int getGapSize()
getGapSize
in class Reinsertion
public void setGapSize(int size)
size
- number of individuals to be removedpublic void setRateSize(int size)
size
- number of individuals to be insertedpublic int getRateSize()
public IndividualStream reinsert(IndividualStream is) throws ReinsertionException
reinsert
in class Reinsertion
is
- individual stream to filterpublic boolean filter(Individual i)
filter
in class Reinsertion
i
- individual to check for insertion
|
eaLib API Docs Last Modified : January 7 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |