|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectOperator.Operations.ReplacementOperation
public class ReplacementOperation
ReplacementOperation removes replacementSize Individuals from the population
| Field Summary | |
|---|---|
protected Fitness[] |
fitnessA
|
protected int |
replacementSize
|
| Constructor Summary | |
|---|---|
ReplacementOperation(int size)
Creates a new instance of ReplacementOperation |
|
ReplacementOperation(java.util.Properties p)
Creates a new instance of ReplacementOperation |
|
| Method Summary | |
|---|---|
void |
doOperation(Individual operand)
Performs the operation on an operand |
void |
doOperation(java.util.List<Individual> operand)
Sort ascending and remove the worst individuals |
void |
doOperation(java.util.List<Individual> operand,
int size)
Sort ascending and remove the size worst individuals |
int |
getReplacementSize()
Get replacement size |
void |
setProperties(java.util.Properties p)
Set properties |
void |
setReplacementSize(int i)
Set replacement size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int replacementSize
protected Fitness[] fitnessA
| Constructor Detail |
|---|
public ReplacementOperation(int size)
size - sizepublic ReplacementOperation(java.util.Properties p)
p - properties| Method Detail |
|---|
public void setProperties(java.util.Properties p)
setProperties in interface ParameterIp - object containing propertiespublic void doOperation(Individual operand)
Operation
doOperation in interface Operationoperand - operand to perform operation onpublic void doOperation(java.util.List<Individual> operand)
doOperation in interface Operationoperand - Individuals to trim
public void doOperation(java.util.List<Individual> operand,
int size)
operand - Individuals to trimsize - Number of individuals to removepublic void setReplacementSize(int i)
i - sizepublic int getReplacementSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||