public class NonDominatedFronts
extends java.lang.Object
NonDominatedFronts
sorts each evaluated Individual
into
fronts based on the number of other individuals it is dominated by. The first
front consists of points that are not dominated at all and so on.Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.util.Collection<org.opt4j.core.Individual>> |
fronts |
Constructor and Description |
---|
NonDominatedFronts(java.util.Collection<org.opt4j.core.Individual> individuals)
Creates the
NonDominatedFronts for the given collection of
Individual s. |
Modifier and Type | Method and Description |
---|---|
protected void |
determineDomination(java.util.Collection<org.opt4j.core.Individual> individuals,
java.util.Map<org.opt4j.core.Individual,java.util.List<org.opt4j.core.Individual>> dominatedIndividualsMap,
int[] dominatingIndividualNumber,
java.util.Map<org.opt4j.core.Individual,java.lang.Integer> individual2IndexMap)
Compares all possible
Individual pairs. |
protected java.util.List<java.util.Collection<org.opt4j.core.Individual>> |
generateFronts(java.util.Collection<org.opt4j.core.Individual> individuals)
Sorts the given
Individual s into non-dominated fronts. |
java.util.Collection<org.opt4j.core.Individual> |
getFrontAtIndex(int index)
Returns the front at the specified index.
|
int |
getFrontNumber()
Returns the number of non-dominated fronts.
|
protected java.util.List<org.opt4j.core.Individual> |
getNextFront(java.util.List<org.opt4j.core.Individual> currentFront,
java.util.Map<org.opt4j.core.Individual,java.util.List<org.opt4j.core.Individual>> dominatedIndividualsMap,
int[] dominatingIndividualNumber,
java.util.Map<org.opt4j.core.Individual,java.lang.Integer> individual2IndexMap)
Finds the next non-dominated front by processing the current
non-dominated front.
|
protected final java.util.List<java.util.Collection<org.opt4j.core.Individual>> fronts
public NonDominatedFronts(java.util.Collection<org.opt4j.core.Individual> individuals)
NonDominatedFronts
for the given collection of
Individual
s.individuals
- the Individual
s that are sorted into non dominated
frontsprotected java.util.List<java.util.Collection<org.opt4j.core.Individual>> generateFronts(java.util.Collection<org.opt4j.core.Individual> individuals)
Individual
s into non-dominated fronts.individuals
- the collection of Individual
s that shall be sortedpublic java.util.Collection<org.opt4j.core.Individual> getFrontAtIndex(int index)
index
- the specified indexpublic int getFrontNumber()
protected java.util.List<org.opt4j.core.Individual> getNextFront(java.util.List<org.opt4j.core.Individual> currentFront, java.util.Map<org.opt4j.core.Individual,java.util.List<org.opt4j.core.Individual>> dominatedIndividualsMap, int[] dominatingIndividualNumber, java.util.Map<org.opt4j.core.Individual,java.lang.Integer> individual2IndexMap)
Individual
s found therein are removed
from consideration. The individuals that are then not dominated form the
next non-dominated front.currentFront
- the list of individuals forming the current non-dominated
frontdominatedIndividualsMap
- map mapping an individual on the collection of individuals
that it dominatesdominatingIndividualNumber
- an array where the number of dominating individuals is stored
for each individualindividual2IndexMap
- a map storing the indices of the individuals used to access
the dominatingIndividualNumberprotected void determineDomination(java.util.Collection<org.opt4j.core.Individual> individuals, java.util.Map<org.opt4j.core.Individual,java.util.List<org.opt4j.core.Individual>> dominatedIndividualsMap, int[] dominatingIndividualNumber, java.util.Map<org.opt4j.core.Individual,java.lang.Integer> individual2IndexMap)
Individual
pairs. For each individual,
stores 1) the number of individuals it is dominated by and 2) the set of
individuals it dominates.individuals
- a collection of individualsdominatedIndividualsMap
- A map that is filled during the execution of the method. Each
individual is mapped onto the set of individuals that are
dominated by this individual.dominatingIndividualNumber
- An integer array (initialized with zeros) that is filled
during the execution of this method. Each individual is
associated with an entry of this array. The integer therein is
the number of individuals this individual is dominated by.individual2IndexMap
- a map mapping each individual onto its index in the
dominatingIndividualNumber - array