public abstract class AbstractArchive extends Archive
AbstractArchive provides some common methods for Archive
s. If one or more new Individuals are added to this Archive,
it is assured that all Individuals in this Archive are not
Pareto-dominated. The methods Archive.add(org.opt4j.core.Individual), Archive.addAll(Collection), and
Archive.addAll(Individual...) are implemented such that each dominated
Individual is removed from the archive and with the new (unknown)
non-dominated Individuals the method
updateWithNondominated(Collection) is called. Actual implementations
of this class may still refuse or drop some Individuals. An
Archive can be a BoundedArchive if it has a bounded size or
an UnboundedArchive, otherwise.| Constructor and Description |
|---|
AbstractArchive() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
update(Set<? extends Individual> individuals)
Updates the archive with a set of individuals.
|
addListener, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, removeListener, retainAll, size, toArray, toArrayequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequals, hashCode, spliteratorparallelStream, removeIf, streampublic boolean update(Set<? extends Individual> individuals)
Archiveadd
/addAll methods, which are prohibited for the archive (throwing
an UnsupportedOperationException), this method shall be used.