@zfunction/genetics-js
Version:
Genetic and evolutionary algorithms framework for the web
13 lines (12 loc) • 741 B
TypeScript
import { BaseIndividual } from '../../individual/base';
import { Crossover, CrossoverParams as BaseCrossoverParams } from './Crossover';
export declare abstract class BaseCrossover<I extends BaseIndividual<T>, T, Params extends BaseCrossoverParams<I, T>> implements Crossover<I, T, Params> {
abstract cross(firstParent: I, secondParent: I, ...args: any[]): I[];
crossWith(firstParent: I, secondParent: I, params: Params): I[];
protected abstract getGenotypeValues(firstParent: I, secondParent: I, params: Params, index: number): {
first: T;
second: T;
};
protected parentsAreValid(firstParent: I, secondParent: I): boolean;
protected checkParents(firstParent: I, secondParent: I): void;
}