public class NSGA2Selector<G extends Gene<?,G>,C extends Comparable<? super C>> extends Object implements Selector<G,C>
count
elements of the population,
which has been sorted by the Crowded-Comparison Operator, as
described in
A Fast and Elitist Multiobjective Genetic Algorithm: NSGA-II
Reference: K. Deb, A. Pratap, S. Agarwal, and T. Meyarivan. 2002. A fast and elitist multiobjective genetic algorithm: NSGA-II. Trans. Evol. Comp 6, 2 (April 2002), 182-197. DOI= 10.1109/4235.996017
Constructor and Description |
---|
NSGA2Selector(Comparator<? super C> dominance,
ElementComparator<? super C> comparator,
ElementDistance<? super C> distance,
ToIntFunction<? super C> dimension)
Creates a new
NSGA2Selector with the functions needed for
handling the multi-objective result type C . |
Modifier and Type | Method and Description |
---|---|
static <G extends Gene<?,G>,T,V extends Vec<T>> |
ofVec()
Return a new selector for the given result type
V . |
ISeq<Phenotype<G,C>> |
select(Seq<Phenotype<G,C>> population,
int count,
Optimize opt) |
public NSGA2Selector(Comparator<? super C> dominance, ElementComparator<? super C> comparator, ElementDistance<? super C> distance, ToIntFunction<? super C> dimension)
NSGA2Selector
with the functions needed for
handling the multi-objective result type C
. For the Vec
classes, a selector is created like in the following example:
new NSGA2Selector<>(
Vec<T>::dominance,
Vec<T>::compare,
Vec<T>::distance,
Vec<T>::length
);
dominance
- the pareto dominance comparatorcomparator
- the vector element comparatordistance
- the vector element distancedimension
- the dimensionality of vector type C
ofVec()
public static <G extends Gene<?,G>,T,V extends Vec<T>> NSGA2Selector<G,V> ofVec()
V
. This method is
a shortcut for
new NSGA2Selector<>(
Vec<T>::dominance,
Vec<T>::compare,
Vec<T>::distance,
Vec<T>::length
);
G
- the gene typeT
- the array type, e.g. double[]
V
- the multi object result type vectorV
© 2007-2018 Franz Wilhelmstötter (2018-10-28 17:23)