|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.moo.archive.Archive net.sourceforge.cilib.moo.archive.constrained.ConstrainedArchive
public abstract class ConstrainedArchive
An Archive
constrained by the number of solutions that it can store.
Constructor Summary | |
---|---|
ConstrainedArchive()
|
Method Summary | |
---|---|
boolean |
add(OptimisationSolution candidateSolution)
Adds the candidateSolution if no solution within the archive dominates it. |
boolean |
addAll(Collection<? extends OptimisationSolution> candidateSolutions)
Iterates through the collection of candidateSolutions and adds the
non-dominated solutions to the archive. |
protected boolean |
addNonDominatedSolution(OptimisationSolution candidateSolution)
|
protected abstract boolean |
addToStructure(OptimisationSolution candidateSolution)
Adds a non-dominated candidateSolution into the archive. |
int |
getCapacity()
|
protected abstract void |
prune()
This method needs to be implemented by all subclasses to provide a way in which certain solutions will be removed if the archive grows too big. |
void |
setCapacity(int capacity)
|
Methods inherited from class net.sourceforge.cilib.moo.archive.Archive |
---|
dominates, get, isDominatedBy, set |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
add, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
Constructor Detail |
---|
public ConstrainedArchive()
Method Detail |
---|
public void setCapacity(int capacity)
public int getCapacity()
public final boolean addAll(Collection<? extends OptimisationSolution> candidateSolutions)
candidateSolutions
and adds the
non-dominated solutions to the archive. If the archive becomes too large
a pruning strategy is invoked afterwards.
candidateSolutions
- The solutions to add to the archive.
public final boolean add(OptimisationSolution candidateSolution)
candidateSolution
if no solution within the archive dominates it.
If the archive becomes too large a pruning strategy is invoked afterwards.
candidateSolution
- The solution to add to the archive.
protected final boolean addNonDominatedSolution(OptimisationSolution candidateSolution)
protected abstract boolean addToStructure(OptimisationSolution candidateSolution)
candidateSolution
into the archive.
candidateSolution
- The non-dominated solution to add to the archive.protected abstract void prune()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |