|
Watchmaker Framework for Evolutionary Computation API (Version 0.7.1) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.uncommons.watchmaker.swing.SelectionStrategyControl<T>
T - A generic type that matches the type associated with the selection strategies.public class SelectionStrategyControl<T>
An evolution control for selecting between different SelectionStrategy implementations.
This control provides a proxy selection strategy that delegates to the currently selected
strategy. Using this proxy strategy with an EvolutionEngine
means that any change to the combo-box selection is immediately reflected in the selection used
by the running evolution engine.
| Constructor Summary | |
|---|---|
SelectionStrategyControl(List<SelectionStrategy<? super T>> options)
Creates a control for choosing between a specified set of selection strategies. |
|
| Method Summary | ||
|---|---|---|
static
|
createDefaultOptions(Probability tournamentProbability,
double truncationRatio)
Creates a list containing one instance of each of the standard selection strategies. |
|
JComboBox |
getControl()
|
|
SelectionStrategy<T> |
getSelectionStrategy()
|
|
void |
reset()
Resets the control to its initial configuration. |
|
void |
setDescription(String description)
Provides a textual description of the purpose of the control. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SelectionStrategyControl(List<SelectionStrategy<? super T>> options)
options - The selection strategies to choose from.| Method Detail |
|---|
public static <T> List<SelectionStrategy<? super T>> createDefaultOptions(Probability tournamentProbability,
double truncationRatio)
RankSelection, RouletteWheelSelection,
StochasticUniversalSampling, TournamentSelection and TruncationSelection.
tournamentProbability - The probability parameter for TournamentSelection.truncationRatio - The ratio parameter for TruncationSelection.
public JComboBox getControl()
getControl in interface EvolutionControlpublic void reset()
reset in interface EvolutionControlpublic void setDescription(String description)
setDescription in interface EvolutionControldescription - The description of the control.public SelectionStrategy<T> getSelectionStrategy()
SelectionStrategy that delegates to whichever
concrete selection strategy is currently selected.
|
Watchmaker Framework for Evolutionary Computation API (Version 0.7.1) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||