public class Crowding extends java.lang.Object implements FrontDensityIndicator
Crowding
, see "A fast and elitist multiobjective genetic
algorithm : NSGA-II, K. Deb, A. Pratap, S. Agarwal, and T. Meyarivan
Evolutionary Computation, IEEETransactions on, vol. 6, no. 2, pp. 182-197,
August 2002.", calculates the crowding distance of Individual
s as
used for instance in the the Nsga2
algorithm. A bounding box around
each individual is defined and restricted by the neighboring individuals in
each dimension. The crowding distance is the sum of the side-lengths of the
bounding box. If an individual does not have neighbors on all sides, the
crowding distance is maximal. A normalization in each dimension is applied.Constructor and Description |
---|
Crowding() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<Individual,java.lang.Double> |
getDensityValues(java.util.Collection<Individual> individuals)
Returns the density values for a collection on
Individuals . |
java.util.List<Individual> |
order(java.util.Map<Individual,java.lang.Double> values)
Returns an ordered list of the
Individual s corresponding to their
crowding distance. |
public java.util.List<Individual> order(java.util.Map<Individual,java.lang.Double> values)
Individual
s corresponding to their
crowding distance. Individual
s with a high crowding distance are
sorted to the front.values
- the map of individuals to their crowding distance valuespublic java.util.Map<Individual,java.lang.Double> getDensityValues(java.util.Collection<Individual> individuals)
FrontDensityIndicator
Individuals
.getDensityValues
in interface FrontDensityIndicator
individuals
- the individuals