|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.entity.operators.selection.SelectionStrategy net.sourceforge.cilib.entity.operators.selection.CompoundSelection
public class CompoundSelection
This class implements the Composite design pattern to correctly apply a group of selection operators to perform a specific selection. For example, a selection my require an Elitism selection of 10% of the available entities, followed by a greedy fitness selection operator.
Constructor Summary | |
---|---|
CompoundSelection()
|
|
CompoundSelection(CompoundSelection copy)
|
Method Summary | ||
---|---|---|
void |
addSelection(SelectionStrategy selectionOperator)
|
|
SelectionStrategy |
getClone()
Create a cloned copy of the current object and return it. |
|
void |
performOperation(TopologyHolder holder)
Perform the operator operation given the current TopologyHolder . |
|
|
select(Topology<T> population)
Apply the selection strategy and return a single Entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompoundSelection()
public CompoundSelection(CompoundSelection copy)
Method Detail |
---|
public SelectionStrategy getClone()
getClone
in interface Operator
getClone
in interface Cloneable
getClone
in class SelectionStrategy
Object.clone()
public <T extends Entity> T select(Topology<T> population)
SelectionStrategy
select
in class SelectionStrategy
T
- The Entity type.population
- The Topology to make the selection from.
public void performOperation(TopologyHolder holder)
Operator
TopologyHolder
.
holder
- The TopologyHolder
representing the required
Topology
instances.public void addSelection(SelectionStrategy selectionOperator)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |