Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Population

Index

Constructors

constructor

  • new Population(chromosomes: Chromosome[], crossoverRate: number, mutationRate: number, fitness: Function): Population
  • Parameters

    • chromosomes: Chromosome[]
    • crossoverRate: number
    • mutationRate: number
    • fitness: Function

    Returns Population

Properties

chromosomes

chromosomes: Chromosome[]

crossoverRate

crossoverRate: number

generation

generation: number

mutationRate

mutationRate: number

Methods

fitness

  • fitness(): object
  • Returns object

reproduction

  • reproduction(): void
  • Returns void

setCrossover

  • setCrossover(type: string): void
  • Parameters

    • type: string

    Returns void

setElitism

  • setElitism(n: number): void
  • Parameters

    • n: number

    Returns void

setMutation

  • setMutation(type: string): void
  • Parameters

    • type: string

    Returns void

setSelection

  • setSelection(type: string, n?: number): void
  • Parameters

    • type: string
    • n: number = 0

    Returns void