public class StochasticUniversalSelector<G extends Gene<?,G>,N extends Number & Comparable<? super N>> extends RouletteWheelSelector<G,N>
StochasticUniversalSelector
is a method for selecting a
population according to some given probability in a way that minimize chance
fluctuations. It can be viewed as a type of roulette game where now we have
P equally spaced points which we spin.
Constructor and Description |
---|
StochasticUniversalSelector() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
Population<G,N> |
select(Population<G,N> population,
int count,
Optimize opt)
This method sorts the population in descending order while calculating the
selection probabilities.
|
String |
toString() |
probabilities
probabilities
public StochasticUniversalSelector()
public Population<G,N> select(Population<G,N> population, int count, Optimize opt)
Population.populationSort()
is called
by this method.)select
in interface Selector<G extends Gene<?,G>,N extends Number & Comparable<? super N>>
select
in class ProbabilitySelector<G extends Gene<?,G>,N extends Number & Comparable<? super N>>
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.public int hashCode()
hashCode
in class RouletteWheelSelector<G extends Gene<?,G>,N extends Number & Comparable<? super N>>
public boolean equals(Object obj)
equals
in class RouletteWheelSelector<G extends Gene<?,G>,N extends Number & Comparable<? super N>>
© 2007-2017 Franz Wilhelmstötter (2017-04-28 16:50)