|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectOperator.Operations.SelectionOperation
Operator.Operations.UserSelect
public abstract class UserSelect
The top N individuals are visually offered to the user and the user picks who should win. All chosen winners keep their fitness evaluation score and all loosers are modified to have the worst possible fitness
Field Summary |
---|
Fields inherited from class Operator.Operations.SelectionOperation |
---|
selectedPopulation, size |
Constructor Summary | |
---|---|
UserSelect()
New instantion |
|
UserSelect(int size,
int pickSize)
Creates a new instance of TournamentSelect |
Method Summary | |
---|---|
protected void |
defaultSelect(java.util.List<Individual> operands)
|
protected void |
display(java.util.List<Individual> operands)
|
void |
doOperation(Individual operand)
Performs the operation on an operand |
void |
doOperation(java.util.List<Individual> operands)
Performs the operation on the list passed |
protected void |
enableDone(boolean enable)
|
protected javax.swing.JPanel |
getPanel()
|
protected static void |
gridAdd(java.awt.Container container,
java.awt.Container control,
int gridX,
int gridY,
double weightX)
gridAdd(Container, Container, int, int, int, int, double, double) overload. |
protected static void |
gridAdd(java.awt.Container container,
java.awt.Container control,
int gridX,
int gridY,
int gridW,
int gridH,
double weightX,
double weightY)
Helper for adding a control to a GridBagLayout control |
protected abstract void |
select(java.util.List<Individual> operands)
|
void |
setProperties(java.util.Properties p)
Set properties |
void |
userPick(java.util.List<Individual> operands)
|
Methods inherited from class Operator.Operations.SelectionOperation |
---|
getSelectedPopulation, getSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserSelect(int size, int pickSize)
size
- size of selected populationpickSize
- size of population to pick frompublic UserSelect()
Method Detail |
---|
public void setProperties(java.util.Properties p)
SelectionOperation
setProperties
in interface ParameterI
setProperties
in class SelectionOperation
p
- object containing propertiespublic void doOperation(Individual operand)
Operation
doOperation
in interface Operation
doOperation
in class SelectionOperation
operand
- operand to perform operation onpublic void doOperation(java.util.List<Individual> operands)
Operation
doOperation
in interface Operation
doOperation
in class SelectionOperation
operands
- Individuals to be selected frompublic void userPick(java.util.List<Individual> operands)
protected void display(java.util.List<Individual> operands)
protected abstract void select(java.util.List<Individual> operands)
protected void defaultSelect(java.util.List<Individual> operands)
protected void enableDone(boolean enable)
protected javax.swing.JPanel getPanel()
protected static void gridAdd(java.awt.Container container, java.awt.Container control, int gridX, int gridY, double weightX)
container
- The control to add control tocontrol
- The control being added to containergridX
- The grid column to add the controlgridY
- The grid row to add the controlweightX
- The amount of horizontal space this column should take
relative to other columnsprotected static void gridAdd(java.awt.Container container, java.awt.Container control, int gridX, int gridY, int gridW, int gridH, double weightX, double weightY)
container
- The control to add control tocontrol
- The control being added to containergridX
- The grid column to add the controlgridY
- The grid row to add the controlgridW
- The number of columns to spangridH
- The number of rows to spanweightX
- The amount of horizontal space this column should take
relative to other columnsweightY
- The amount of vertical space this column should take
relative to other rows
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |