
MOEA Framework 2.12 API Specification 

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object org.moeaframework.core.operator.grammar.GrammarMutation
public class GrammarMutation
Uniform mutation for grammars. Each integer codon in the grammar representation is uniformly mutated with a specified probability.
This variation operator is typesafe.
Constructor Summary  

GrammarMutation(double probability)
Constructs a uniform mutation operator for grammars with the specified probability of mutating each integer codon in the grammar representation. 
Method Summary  

static void 
evolve(Grammar grammar,
double probability)
Performs uniform mutation on the specified grammar. 
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 GrammarMutation(double probability)
probability
 the probability of mutating each integer codon in the
grammar representationMethod Detail 

public Solution[] evolve(Solution[] parents)
Variation
getArity
) 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 Variation
parents
 the array of parent solutions
public static void evolve(Grammar grammar, double probability)
[0, getMaximumValue()1]
.
grammar
 the grammar to mutateprobability
 the probability of mutating each integer codon in the
grammar representationpublic int getArity()
Variation
evolve
method.
getArity
in interface Variation
evolve
method

MOEA Framework 2.12 API Specification 

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 