Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Operator.Operations.ContextSensitiveOperations
Class SubtreeMutation

    java.lang.Object
      Operator.Operations.MutationOperation
          Operator.Operations.ContextSensitiveOperations.SubtreeMutation

All Implemented Interfaces:
  Operation, ParameterI, Stochastic

    public class SubtreeMutation

extends MutationOperation

Pick a single point to mutate, but having mutated, remove all the codons that used to define the old branch, and then follow the new branch, randomly generating values to pick productions, until a complete branch is built or the maximum depth is reached. This preserves all branches that were not part of the chosen [mutated] branch

Author:
  eliott bartley

Field Summary
`protected Initialiser` | `initialiser`

Fields inherited from class Operator.Operations.MutationOperation
`fitnessFunction, noOfMutationCalls, probability, rng`

Constructor Summary
`SubtreeMutation(double prob, RandomNumberGenerator rng)`
`SubtreeMutation(RandomNumberGenerator rng, java.util.Properties p)`

Method Summary
`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 Initialiser` | `getInitialiser(GEGrammar g, RandomNumberGenerator rng, java.util.Properties p)` Load and initialise the initialiser class according to the parameters Defualt initialiser is the RandomInitialiser.
`int` | `getMaxDTIndex(DerivationTree dT)`
`void` | `setCreationOperation(CreationOperation creationOperation)`

Methods inherited from class Operator.Operations.MutationOperation
`getRNG, setFitnessFunction, setProperties, setRNG`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### initialiser

    protected Initialiser initialiser

Constructor Detail

### SubtreeMutation

    public SubtreeMutation(RandomNumberGenerator rng,
                           java.util.Properties p)

### SubtreeMutation

    public SubtreeMutation(double prob,
                           RandomNumberGenerator rng)

Method Detail

### setCreationOperation

    public void setCreationOperation(CreationOperation creationOperation)

### doOperation

    public void doOperation(Individual operand)

  Description copied from interface: `Operation`
  Performs the operation on an operand

  Specified by:
    `doOperation` in interface `Operation`
  Specified by:
    `doOperation` in class `MutationOperation`
  Parameters:
    `operand` - operand to perform operation on

### getMaxDTIndex

    public int getMaxDTIndex(DerivationTree dT)

### doOperation

    public void doOperation(java.util.List<Individual> operands)

  Description copied from interface: `Operation`
  Performs the operation on the list passed

  Specified by:
    `doOperation` in interface `Operation`
  Specified by:
    `doOperation` in class `MutationOperation`
  Parameters:
    `operands` - operands to be operated on

### getInitialiser

    protected Initialiser getInitialiser(GEGrammar g,
                                         RandomNumberGenerator rng,
                                         java.util.Properties p)

  Load and initialise the initialiser class according to the parameters Defualt initialiser is the RandomInitialiser. To add other initialisers expand the if-statement with another clause

  Parameters:
    `g` - GEGrammar
    `rng` - RandomNumberGenerator
    `p` - Properties
  Returns:
    Intialiser

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD