org.opt4j.core.optimizer
Class Archive
java.lang.Object
org.opt4j.core.IndividualSet
org.opt4j.core.optimizer.Archive
- All Implemented Interfaces:
- java.lang.Iterable<Individual>, java.util.Collection<Individual>, java.util.Set<Individual>
- Direct Known Subclasses:
- AbstractArchive
public abstract class Archive
- extends IndividualSet
An Archive is used to store a set of high-quality Individual
s. Commonly, these Individuals are non-dominated.
| 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 |
Archive
public Archive()
update
public boolean update(Individual individual)
- Updates the archive with a single individual.
- Parameters:
individual - the individual that is used to update the archive
- Returns:
- returns
true if the content of the archive changed
update
public abstract boolean update(java.util.Set<? extends Individual> individuals)
- Updates the archive with a set of individuals. Instead of the
add
/addAll methods, which are prohibited for the archive (throwing
an UnsupportedOperationException), this method shall be used.
- Parameters:
individuals - the set of individuals that is used to update the archive
- Returns:
- returns
true if the content of the archive changed
addCheckedIndividual
protected boolean addCheckedIndividual(Individual individual)
- Adds the
Individual to this Archive without further
checks. Must be used only if the Individual is checked to be
Pareto-dominant and, according to possible archive size restrictions, can
be added to this Archive.
- Parameters:
individual - the individual to be actually added to the archive
- Returns:
- true
addCheckedIndividuals
protected boolean addCheckedIndividuals(java.util.Collection<? extends Individual> individuals)
- Adds the
Individuals to this Archive without further
checks. Must be used only if the Individuals are checked to be
Pareto-dominant and, according to possible archive size restrictions, can
all be added to this Archive.
- Parameters:
individuals - the individuals to be actually added to the archive
- Returns:
- true