org.opt4j.core.common.archive
Class CrowdingArchive

java.lang.Object
  extended by org.opt4j.core.IndividualSet
      extended by org.opt4j.core.optimizer.Archive
          extended by org.opt4j.core.common.archive.AbstractArchive
              extended by org.opt4j.core.common.archive.BoundedArchive
                  extended by org.opt4j.core.common.archive.CrowdingArchive
All Implemented Interfaces:
java.lang.Iterable<Individual>, java.util.Collection<Individual>, java.util.Set<Individual>
Direct Known Subclasses:
DefaultArchive

public class CrowdingArchive
extends BoundedArchive

The CrowdingArchive is based on the Crowding distance.

See Also:
Crowding

Field Summary
 
Fields inherited from class org.opt4j.core.common.archive.BoundedArchive
capacity
 
Fields inherited from class org.opt4j.core.IndividualSet
individuals, listeners
 
Constructor Summary
CrowdingArchive(int capacity)
          Constructs a CrowdingArchive.
 
Method Summary
protected  boolean updateWithNondominated(java.util.Collection<Individual> candidates)
          Adds new candidates which are already checked to be not Pareto-dominated by any other individual in this Archive.
 
Methods inherited from class org.opt4j.core.common.archive.BoundedArchive
addCheckedIndividual, addCheckedIndividuals, getCapacity, setCapacity
 
Methods inherited from class org.opt4j.core.common.archive.AbstractArchive
update
 
Methods inherited from class org.opt4j.core.optimizer.Archive
update
 
Methods inherited from class org.opt4j.core.IndividualSet
add, addAll, addAll, addListener, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, removeListener, retainAll, size, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Set
equals, hashCode
 

Constructor Detail

CrowdingArchive

@Inject
public CrowdingArchive(int capacity)
Constructs a CrowdingArchive.

Parameters:
capacity - capacity of this archive (using namespace BoundedArchive)
Method Detail

updateWithNondominated

protected boolean updateWithNondominated(java.util.Collection<Individual> candidates)
Description copied from class: AbstractArchive
Adds new candidates which are already checked to be not Pareto-dominated by any other individual in this Archive. All Individuals in the Archive which were dominated by the candidates have already been removed.

Specified by:
updateWithNondominated in class AbstractArchive
Parameters:
candidates - the non-dominated individuals which can be added
Returns:
true if one or more candidates are added to the archive