|
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.ShiftMutator
Shift mutation of an integer array. This operator will cut out random elements, shift the remaining elements upwards and append the elements, that were clipped, to the end of the array.
Field Summary | |
protected int[] |
clipArray
Array of clipped elements. |
protected int |
clipNumber
Number of clipped elements. |
protected float |
clipPercentage
Number of clipped elements (percentage). |
Fields inherited from class org.evolvica.core.mutate.AbstractMutator |
propability |
Fields inherited from class org.evolvica.engine.AbstractOperator |
descriptor, element, id, name |
Constructor Summary | |
ShiftMutator()
Constructor. |
|
ShiftMutator(float percentage)
Constructor with number of clipped elements. |
|
ShiftMutator(int number)
Constructor with number of clipped elements. |
Method Summary | |
int[] |
mutate(int[] array)
Mutates an integer array. |
protected int[] |
setupClipArray(int[] array,
int arrayLength)
Set up the clip array |
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 clipNumber
protected float clipPercentage
protected int[] clipArray
Constructor Detail |
public ShiftMutator()
public ShiftMutator(float percentage)
percentage
- percentage value of the number of elements to be clippedpublic ShiftMutator(int number)
number
- number of elements to be clippedMethod Detail |
public int[] mutate(int[] array)
IntegerArrayMutator
mutate
in class IntegerArrayMutator
array
- integer array to be mutated
IntegerArrayMutator.mutate(int[])
protected int[] setupClipArray(int[] array, int arrayLength)
array
- clip arrayarrayLength
- clip length
|
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 |