Package org.evoludo.simulator.modules
Class Mutation.Discrete
- Direct Known Subclasses:
Centipede.CentiMutations
- Enclosing class:
Mutation
The class to implement mutations in discrete IBS models.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Mutation
Mutation.Continuous, Mutation.Discrete -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal CLOptionCommand line option to set the type of player updates.Fields inherited from class Mutation
module, probability, range, rng, temperature, type -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
clo
Command line option to set the type of player updates.
-
-
Constructor Details
-
Discrete
Construct mutator for discrete traits.- Parameters:
module- the module using this mutation
-
-
Method Details
-
doMutate
public boolean doMutate()Description copied from class:MutationCheck if a mutation arises. -
mutate
public int mutate(int trait) Description copied from class:MutationMutate traittraitin IBS models according to the type of mutation. -
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 inchangeaccordinlgy. In multi-species modules the indices referring to the current species run fromfromtoto.- Parameters:
state- the state to mutatechange- the change of the statefrom- the start index of the traits to mutateto- the end index of the traits to mutate- See Also:
-