mut Shuffle Indexes
fun <T, F> CellEvolveScope<Array<T>, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double)
fun <F> CellEvolveScope<BooleanArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double)
fun <F> CellEvolveScope<ByteArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double)
fun <F> CellEvolveScope<CharArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double)
fun <F> CellEvolveScope<DoubleArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double)
fun <F> CellEvolveScope<FloatArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double)
fun <F> CellEvolveScope<IntArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double)
fun <F> CellEvolveScope<LongArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double)
fun <T, F> CellEvolveScope<MutableList<T>, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double)
fun <F> CellEvolveScope<ShortArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double)
Executes a shuffle the attributes of the input chromosome. Usually this mutation is applied on vector of indices.
Example:
Before mutation: 0, 1, 2, 3, 4
After mutation: 1, 4, 0, 3, 2 // genes change only position
Content copied to clipboard
Parameters
chance
chance of mutation between a pair of chromosomes
shuffle Indexes Chance
the probability of each attribute to be moved.