|
MOEA Framework 2.5 API Specification |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.moeaframework.core.operator.program.SubtreeCrossover
public class SubtreeCrossover
Exchanges a randomly-selected subtree from one program with a compatible, randomly-selected subtree from another program.
This operator is type-safe.
| Constructor Summary | |
|---|---|
SubtreeCrossover(double probability)
Constructs a new subtree crossover instance. |
|
| Method Summary | |
|---|---|
protected void |
crossover(Program program1,
Program program2,
Rules rules)
Applies subtree crossover to the programs. |
Solution[] |
evolve(Solution[] parents)
Evolves one or more parent solutions (specified by getArity) and
produces one or more child solutions. |
int |
getArity()
Returns the number of solutions that must be supplied to the evolve method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SubtreeCrossover(double probability)
probability - the probability that subtree crossover is applied to
a program| Method Detail |
|---|
public int getArity()
Variationevolve method.
getArity in interface Variationevolve methodpublic Solution[] evolve(Solution[] parents)
VariationgetArity) and
produces one or more child solutions. By contract, the parents must not
be modified. The copy constructor should be used to create copies of the
parents with these copies subsequently modified.
evolve in interface Variationparents - the array of parent solutions
protected void crossover(Program program1,
Program program2,
Rules rules)
program1 - the first program, which is the parent programprogram2 - the second program, which provides the replacement
subtreerules - the rules defining the program syntax
|
MOEA Framework 2.5 API Specification |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||