Module io.jenetics.base
Package io.jenetics
Class MonteCarloSelector<G extends Gene<?,G>,C extends Comparable<? super C>>
java.lang.Object
io.jenetics.MonteCarloSelector<G,C>
- All Implemented Interfaces:
Selector<G,
C>
public final class MonteCarloSelector<G extends Gene<?,G>,C extends Comparable<? super C>>
extends Object
implements Selector<G,C>
The Monte Carlo selector selects the individuals from a given population
randomly. This selector can be used to measure the performance of another
selector. In general, the performance of a selector should be better than
the selection performance of the Monte Carlo selector.
- Since:
- 1.0
- Version:
- 5.0
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
MonteCarloSelector
public MonteCarloSelector()
-
-
Method Details
-
select
Description copied from interface:Selector
Select phenotypes from the Population.- Specified by:
select
in interfaceSelector<G extends Gene<?,
G>, C extends Comparable<? super C>> - Parameters:
population
- The population to select from.count
- The number of phenotypes to select.opt
- Determines whether the individuals with higher fitness values or lower fitness values must be selected. This parameter determines whether the GA maximizes or minimizes the fitness function.- Returns:
- The selected phenotypes (a new Population).
-
toString
-