Constructor
new BinaryIndividual(bitArray)
Creates individual from bit array.
Parameters:
Name | Type | Description |
---|---|---|
bitArray |
Array | configuration |
- Source:
Methods
copy() → {BinaryIndividual}
Returns deep copy of individual.
- Source:
Returns:
deep copy
- Type
- BinaryIndividual
getBitArray() → {Array}
Gets bit array.
- Source:
Returns:
bit array
- Type
- Array
getGenotype() → {Array}
Gets bit array.
- Source:
Returns:
bit array
- Type
- Array
getSize() → {number}
Gets size of bit array.
- Source:
Returns:
size of bit array
- Type
- number
mutate(mutationRate)
Performs inversion mutation with given probability.
Parameters:
Name | Type | Description |
---|---|---|
mutationRate |
number | probability that each bit is inverted |
- Source: