Constructors
constructor
- new Population(chromosomes: Chromosome[], crossoverRate: number, mutationRate: number, fitness: Function): Population
-
Parameters
-
-
crossoverRate: number
-
mutationRate: number
-
fitness: Function
Properties
crossoverRate
crossoverRate: number
generation
generation: number
mutationRate
mutationRate: number
Methods
setCrossover
- setCrossover(type: string): void
setElitism
- setElitism(n: number): void
setMutation
- setMutation(type: string): void
setSelection
- setSelection(type: string, n?: number): void
-
Parameters
-
type: string
-
n: number = 0
Returns void