gpalta.ops
Class IndSelectorProportional
java.lang.Object
gpalta.ops.IndSelector
gpalta.ops.IndSelectorProportional
public class IndSelectorProportional
- extends IndSelector
Implements proportional selection (deterministic). First, a number of copies
from each individual, equal to each expectated number of copies integer, are
selected for next population. Then, the following individuals are selected
from the decimals of the expectated number of copies of each tree.
Method Summary |
|
select(java.util.List<T> population)
Performs the selection |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IndSelectorProportional
public IndSelectorProportional(Config config,
Ranking theRanking)
- Creates a new instance of IndSelectorProportional
select
public <T extends Individual> java.util.List<T> select(java.util.List<T> population)
- Performs the selection
- Specified by:
select
in class IndSelector
- Parameters:
population
- A list of Trees from where to select the individuals
- Returns:
- A new list of Trees with the selected individuals. If a Tree is
selected more than once, each instance of that Tree will be a totally
independant individual (no other Trees will be modified when modifying that Tree)