Class Mutation.Discrete

Object
Mutation
Discrete
Direct Known Subclasses:
Centipede.CentiMutations
Enclosing class:
Mutation

public static class Mutation.Discrete extends Mutation
The class to implement mutations in discrete IBS models.
  • Field Details

    • clo

      public final CLOption clo
      Command line option to set the type of player updates.
  • Constructor Details

    • Discrete

      public Discrete(Module module)
      Construct mutator for discrete traits.
      Parameters:
      module - the module using this mutation
  • Method Details

    • doMutate

      public boolean doMutate()
      Description copied from class: Mutation
      Check if a mutation arises.
      Specified by:
      doMutate in class Mutation
      Returns:
      true if a mutation should be performed
    • mutate

      public int mutate(int trait)
      Description copied from class: Mutation
      Mutate trait trait in IBS models according to the type of mutation.
      Overrides:
      mutate in class Mutation
      Parameters:
      trait - the trait to mutate
      Returns:
      the mutated trait
      See Also:
    • mutate

      public void mutate(double[] state, double[] change, int from, int to)
      Mutate traits in DE models according to the type of mutation. Adjust the change of the state in change accordinlgy. In multi-species modules the indices referring to the current species run from from to to.
      Parameters:
      state - the state to mutate
      change - the change of the state
      from - the start index of the traits to mutate
      to - the end index of the traits to mutate
      See Also: