UNPKG

@zfunction/genetics-js

Version:

Genetic and evolutionary algorithms framework for the web

25 lines (24 loc) 902 B
import { NumericParams } from '../base/NumericGenerator'; import { FloatingIndividual } from './../../../individual/numeric/floating'; import { NumericGenerator } from './../base'; /** * ## Floating generator * Generates a [[FloatingIndividual]]. */ export declare class FloatingGenerator extends NumericGenerator<FloatingIndividual> { /** * Generates a gene with the specified * params. * @param params of the generator. * @return the generated gene. */ generateGene(params: NumericParams): number; /** * Construct the [[FloatingIndividual]] with * the specified genotype and range. * @param genotype of the generated individual. * @param params of the generator. * @return Constructed [[FloatingIndividual]] from genotype. */ construct(genotype: number[], params: NumericParams): FloatingIndividual; }