@zfunction/genetics-js
Version:
Genetic and evolutionary algorithms framework for the web
13 lines (12 loc) • 749 B
TypeScript
import { BaseIndividual } from '../../individual/base/BaseIndividual';
import { Population } from '../../population/Population';
import { SelectionImplementation } from '../implementation/SelectionImplementation';
import { BaseSelection, BaseSelectionParams } from './BaseSelection';
export interface FitnessProportionalSelectionParams<I extends BaseIndividual<T>, T> extends BaseSelectionParams {
subSelection: SelectionImplementation<I, T>;
}
export declare class FitnessProportionalSelection<I extends BaseIndividual<T>, T> extends BaseSelection<I, T> {
private cumulativeProbability;
selectWith(population: Population<I, T>, params: FitnessProportionalSelectionParams<I, T>): I[];
private getCumulativeProbability;
}