MOEA Framework 2.5
API Specification

org.moeaframework.core
Class NondominatedPopulation

java.lang.Object
  extended by org.moeaframework.core.Population
      extended by org.moeaframework.core.NondominatedPopulation
All Implemented Interfaces:
Iterable<Solution>
Direct Known Subclasses:
AdaptiveGridArchive, EpsilonBoxDominanceArchive, FitnessBasedArchive

public class NondominatedPopulation
extends Population

A population that maintains the property of pair-wise non-dominance between all solutions. When the add method is invoked with a new solution, all solutions currently in the population that are dominated by the new solution are removed. If the new solution is dominated by any member of the population, the new solution is not added.


Constructor Summary
NondominatedPopulation()
          Constructs an empty non-dominated population using the Pareto dominance relation.
NondominatedPopulation(DominanceComparator comparator)
          Constructs an empty non-dominated population using the specified dominance relation.
NondominatedPopulation(DominanceComparator comparator, Iterable<? extends Solution> iterable)
          Constructs a non-dominated population using the specified dominance comparator and initialized with the specified solutions.
NondominatedPopulation(Iterable<? extends Solution> iterable)
          Constructs a non-dominated population using the Pareto dominance relation and initialized with the specified solutions.
 
Method Summary
 boolean add(Solution newSolution)
          If newSolution is dominates any solution or is non-dominated with all solutions in this population, the dominated solutions are removed and newSolution is added to this population.
protected  double distance(Solution s1, Solution s2)
          Returns the Euclidean distance between two solutions in objective space.
protected  boolean forceAddWithoutCheck(Solution newSolution)
          Adds the specified solution to the population, bypassing the non-domination check.
 DominanceComparator getComparator()
          Returns the dominance comparator used by this non-dominated population.
 
Methods inherited from class org.moeaframework.core.Population
addAll, addAll, clear, contains, containsAll, containsAll, get, indexOf, isEmpty, iterator, remove, remove, removeAll, removeAll, size, sort, truncate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NondominatedPopulation

public NondominatedPopulation()
Constructs an empty non-dominated population using the Pareto dominance relation.


NondominatedPopulation

public NondominatedPopulation(DominanceComparator comparator)
Constructs an empty non-dominated population using the specified dominance relation.

Parameters:
comparator - the dominance relation used by this non-dominated population

NondominatedPopulation

public NondominatedPopulation(Iterable<? extends Solution> iterable)
Constructs a non-dominated population using the Pareto dominance relation and initialized with the specified solutions.

Parameters:
iterable - the solutions used to initialize this non-dominated population

NondominatedPopulation

public NondominatedPopulation(DominanceComparator comparator,
                              Iterable<? extends Solution> iterable)
Constructs a non-dominated population using the specified dominance comparator and initialized with the specified solutions.

Parameters:
comparator - the dominance relation used by this non-dominated population
iterable - the solutions used to initialize this non-dominated population
Method Detail

add

public boolean add(Solution newSolution)
If newSolution is dominates any solution or is non-dominated with all solutions in this population, the dominated solutions are removed and newSolution is added to this population. Otherwise, newSolution is dominated and is not added to this population.

Overrides:
add in class Population
Parameters:
newSolution - the solution to be added
Returns:
true if the population was modified as a result of this method; false otherwise.

forceAddWithoutCheck

protected boolean forceAddWithoutCheck(Solution newSolution)
Adds the specified solution to the population, bypassing the non-domination check. This method should only be used when a non-domination check has been performed elsewhere, such as in a subclass.

This method should only be used internally, and should never be made public by any subclasses.

Parameters:
newSolution - the solution to be added
Returns:
true if the population was modified as a result of this operation

distance

protected double distance(Solution s1,
                          Solution s2)
Returns the Euclidean distance between two solutions in objective space.

Parameters:
s1 - the first solution
s2 - the second solution
Returns:
the distance between the two solutions in objective space

getComparator

public DominanceComparator getComparator()
Returns the dominance comparator used by this non-dominated population.

Returns:
the dominance comparator used by this non-dominated population

MOEA Framework 2.5
API Specification

Copyright 2009-2015 MOEA Framework. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage. Hosted by Get MOEA Framework at SourceForge.net. Fast, secure and Free Open Source software downloads