public abstract class AbstractArchive extends Archive
AbstractArchive
provides some common methods for Archive
s. If one or more new Individual
s are added to this Archive
,
it is ensured that all Individual
s in this Archive
are not
Pareto-dominated. Actual implementations of this class may still refuse or
drop some Individual
s. An Archive
can be a
BoundedArchive
if it has a bounded size or an
UnboundedArchive
, otherwise.individuals, listeners
Constructor and Description |
---|
AbstractArchive() |
Modifier and Type | Method and Description |
---|---|
boolean |
update(java.util.Set<? extends Individual> individuals)
Updates the archive with a set of individuals.
|
protected abstract 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 . |
addCheckedIndividual, addCheckedIndividuals, update
add, addAll, addAll, addListener, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, removeListener, retainAll, size, toArray, toArray
public boolean update(java.util.Set<? extends Individual> individuals)
Archive
add
/addAll
methods, which are prohibited for the archive (throwing
an UnsupportedOperationException
), this method shall be used.protected abstract boolean updateWithNondominated(java.util.Collection<Individual> candidates)
candidates
which are already checked to be not
Pareto-dominated by any other individual in this Archive
. All
Individual
s in the Archive
which were dominated by the
candidates have already been removed.candidates
- the non-dominated individuals which can be added