Package org.opt4j.common.archive
Class CrowdingArchive
java.lang.Object
org.opt4j.core.IndividualSet
org.opt4j.core.optimizer.Archive
org.opt4j.common.archive.AbstractArchive
org.opt4j.common.archive.BoundedArchive
org.opt4j.common.archive.CrowdingArchive
- All Implemented Interfaces:
Iterable<Individual>,Collection<Individual>,Set<Individual>
- Direct Known Subclasses:
DefaultArchive
- See Also:
-
Field Summary
Fields inherited from class org.opt4j.common.archive.BoundedArchive
capacityFields inherited from class org.opt4j.core.IndividualSet
individuals, listeners -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanupdateWithNondominated(Collection<Individual> candidates) Adds newcandidateswhich are already checked to be not Pareto-dominated by any other individual in thisArchive.Methods inherited from class org.opt4j.common.archive.BoundedArchive
addCheckedIndividual, addCheckedIndividuals, getCapacity, setCapacityMethods inherited from class org.opt4j.common.archive.AbstractArchive
updateMethods inherited from class org.opt4j.core.IndividualSet
addListener, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, removeListener, retainAll, size, toArray, toArrayMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
equals, hashCode, spliterator
-
Constructor Details
-
CrowdingArchive
@Inject public CrowdingArchive(int capacity) Constructs aCrowdingArchive.- Parameters:
capacity- capacity of this archive (using namespaceBoundedArchive)
-
-
Method Details
-
updateWithNondominated
Description copied from class:AbstractArchiveAdds newcandidateswhich are already checked to be not Pareto-dominated by any other individual in thisArchive. AllIndividuals in theArchivewhich were dominated by the candidates have already been removed.- Specified by:
updateWithNondominatedin classAbstractArchive- Parameters:
candidates- the non-dominated individuals which can be added- Returns:
- true if one or more candidates are added to the archive
-