|
Evolvica Core API Version 0.6.2 Last Modified: June 29 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.evolvica.engine.AbstractOperator
org.evolvica.core.common.AbstractGeneticOperator
org.evolvica.core.mutate.AbstractMutator
org.evolvica.core.mutate.iarray.IntegerArrayMutator
org.evolvica.core.mutate.iarray.ReverseMutator
Reverse mutation of an integer array. This operator will randomly reverse a section of an array.
Field Summary | |
protected int |
lowerBound
Lower bound. |
protected float |
rangePercentage
Mutation range. |
protected int |
upperBound
Upper bound. |
Fields inherited from class org.evolvica.core.mutate.AbstractMutator |
propability |
Fields inherited from class org.evolvica.engine.AbstractOperator |
descriptor, element, id, name |
Constructor Summary | |
ReverseMutator()
Constructor. |
|
ReverseMutator(float rangePercentage)
Constructor with random range. |
|
ReverseMutator(int lBound,
int uBound)
Constructor with lower and upper reverse bound. |
Method Summary | |
int[] |
mutate(int[] array)
Reverses an array of integers. |
protected int[] |
randomRange(int length)
Helper for calculating a valid reverse range, dependent from length of array and percentage value. |
Methods inherited from class org.evolvica.core.mutate.iarray.IntegerArrayMutator |
mutate |
Methods inherited from class org.evolvica.core.mutate.AbstractMutator |
getPropability, process, setPropability |
Methods inherited from class org.evolvica.engine.AbstractOperator |
attachDescriptor, attachElement, descriptor, element, getId, getName, setId, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.evolvica.engine.IOperator |
attachDescriptor, attachElement, descriptor, element, getId, getName, setId, setName |
Field Detail |
protected int lowerBound
protected int upperBound
protected float rangePercentage
Constructor Detail |
public ReverseMutator()
public ReverseMutator(float rangePercentage)
rangePercentage
- percentage value of the length of a randomly selected range to reversepublic ReverseMutator(int lBound, int uBound)
lBound
- lower bound for reversinguBound
- upper bound for reversingMethod Detail |
public int[] mutate(int[] array)
mutate
in class IntegerArrayMutator
array
- array to be reversed
protected int[] randomRange(int length)
length
- length of the array
|
Evolvica Core API Version 0.6.2 Last Modified: June 29 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |