ChromosomeFloatArray

data class ChromosomeFloatArray<F : Comparable<F>>(var value: FloatArray, var fitness: F? = null) : Chromosome<FloatArray, F>

Base instance for Chromosome with value as FloatArray of something

Use floats function to easily create ChromosomeFloatArray

Constructors

Link copied to clipboard
constructor(value: FloatArray, fitness: F? = null)

Properties

Link copied to clipboard
open override var fitness: F?

Calculated value by fitness function for a specific individual

Link copied to clipboard
open override var value: FloatArray

Combination of genes for a Chromosome (individual) (Often an array or string)

Functions

Link copied to clipboard
open override fun clone(): Chromosome<FloatArray, F>

Clone function to create deap copied Chromosome with the same value and fitness

Link copied to clipboard
open operator override fun compareTo(other: Chromosome<FloatArray, F>): Int
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
inline fun <V, F> Chromosome<V, F>.evaluate(fitnessFunction: (V) -> F)

Base evaluates function for Chromosome by fitnessFunction

Link copied to clipboard
open override fun hashCode(): Int