Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Chromosome

Index

Constructors

constructor

Properties

fitness

fitness: number

genes

genes: number[]

Methods

copy

crossover

find

  • find(gene: number): number
  • Parameters

    • gene: number

    Returns number

initFloat

  • initFloat(length: number, lower: number, upper: number): void
  • Parameters

    • length: number
    • lower: number
    • upper: number

    Returns void

initInteger

  • initInteger(length: number, lower: number, upper: number): void
  • Parameters

    • length: number
    • lower: number
    • upper: number

    Returns void

initPermutation

  • initPermutation(length: number): void
  • Parameters

    • length: number

    Returns void

mutation

  • mutation(mutationRate: number): void
  • Parameters

    • mutationRate: number

    Returns void

setCrossover

  • setCrossover(type: string): void
  • Parameters

    • type: string

    Returns void

setMutation

  • setMutation(type: string): void
  • Parameters

    • type: string

    Returns void

shuffle

  • shuffle(): void
  • Returns void

swap

  • swap(i: number, j: number): void
  • Parameters

    • i: number
    • j: number

    Returns void

toString

  • toString(code?: boolean): string
  • Parameters

    • code: boolean = false

    Returns string