|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mutationRules.MutateStrategy
This mutates strategies based on a mutation matrix
Constructor Summary | |
MutateStrategy(double[][] m)
The constructor which takes a mutation matrix |
|
MutateStrategy(double m,
int s)
Sets the mutation matrix as uniform based on m |
Method Summary | |
double |
getMutationRate()
Because there is no single mutation rate this is undefined. |
void |
mutate(Individual i)
This function mutates based on the mutation matrix already established by the constructor. |
void |
setMutationRate(double[][] m)
Same as constructor |
void |
setMutationRate(double m,
int s)
Sets the mutation rate (equivalent to the constructor) |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MutateStrategy(double[][] m) throws ModelError
m
- The mutation matrix where [i][j] is the
probability that strategy i mutates to
strategy j.
ModelError
public MutateStrategy(double m, int s) throws ModelError
m
- The mutation rate (the probability that
a given strategy switches to any other strategy)s
- The number of strategies
ModelError
Method Detail |
public void mutate(Individual i) throws ModelError
mutate
in interface MutationRule
i
- The Calling Individual
ModelError
public void setMutationRate(double m, int s) throws ModelError
setMutationRate
in interface MutationRule
ModelError
public void setMutationRate(double[][] m) throws ModelError
m
- The mutation matrix where [i][j] is the
probability that strategy i mutates to
strategy j.
ModelError
public double getMutationRate()
getMutationRate
in interface MutationRule
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |