Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core.population
Class DiscreteInsertion

java.lang.Object
  extended byorg.evolvica.core.population.AbstractInsertionFilter
      extended byorg.evolvica.core.population.DiscreteInsertion
All Implemented Interfaces:
IInsertionFilter

public class DiscreteInsertion
extends AbstractInsertionFilter

Discrete reinsertion. This operator works in the same way as UniformInsertion with the difference that discrete values for generation gap and reinsertion rate instead of percentage values can be given.

Since:
0.4.0
Version:
$Revision: 1.6 $ $Date: 2004/05/26 11:58:11 $
Author:
Andreas Rummler

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 org.evolvica.core.population.AbstractInsertionFilter
generationGap, insertionRate
 
Constructor Summary
DiscreteInsertion()
          Constructor.
DiscreteInsertion(int gap, int rate)
          Constructor with insertion parameters.
 
Method Summary
 int getGapSize()
          Gets the number of individuals to be removed.
 int getRateSize()
          Gets the number of individuals to be inserted.
 void insert(IPopulation population, IIndividualSet pool)
          Inserts individuals into the given population.
 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 org.evolvica.core.population.AbstractInsertionFilter
generationGapSize, getGenerationGap, getInsertionRate, insertionRateSize, setGenerationGap, setInsertionRate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gapSize

protected int gapSize
Number of individuals to be deleted from the population.


rateSize

protected int rateSize
Number of individuals to inserted from the reinsertion pool.

Constructor Detail

DiscreteInsertion

public DiscreteInsertion()
Constructor.


DiscreteInsertion

public DiscreteInsertion(int gap,
                         int rate)
Constructor with insertion parameters.

Parameters:
gap - number of individuals to be removed
rate - number of individuals to inserted
Method Detail

getGapSize

public int getGapSize()
Gets the number of individuals to be removed.

Returns:
number of individuals to be removed

setGapSize

public void setGapSize(int size)
Sets the number of individuals to be removed.

Parameters:
size - number of individuals to be removed

setRateSize

public void setRateSize(int size)
Sets the number of individuals to be inserted.

Parameters:
size - number of individuals to be inserted

getRateSize

public int getRateSize()
Gets the number of individuals to be inserted.

Returns:
number of individuals to be inserted

insert

public void insert(IPopulation population,
                   IIndividualSet pool)
Description copied from interface: IInsertionFilter
Inserts individuals into the given population.

Specified by:
insert in interface IInsertionFilter
Specified by:
insert in class AbstractInsertionFilter
See Also:
IInsertionFilter.insert(org.evolvica.core.population.IPopulation, org.evolvica.core.IIndividualSet)

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

Copyright © 2000-2004 Technical University of Ilmenau, Department Electronic Circuits and Systems