genetic-search-multiprocess
Version:
Multiprocessing genetic algorithm implementation library extension
21 lines (20 loc) • 1.06 kB
TypeScript
import { BaseGenome, BasePhenomeStrategy, GenerationPhenomeMatrix } from "genetic-search";
import { MultiprocessingPhenomeStrategyConfig } from "./types";
/**
* Base class for phenome strategies that uses multiprocessing to execute phenome calculation tasks.
*
* @template TGenome - The type of the genome.
* @template TConfig - The type of the configuration for the phenome strategy.
* @template TTaskConfig - The type of the configuration for each phenome calculation task.
*
* @category Strategies
*/
export declare abstract class BaseMultiprocessingPhenomeStrategy<TGenome extends BaseGenome, TConfig extends MultiprocessingPhenomeStrategyConfig<TTaskConfig>, TTaskConfig> extends BasePhenomeStrategy<TGenome, TConfig, TTaskConfig> {
/**
* Execute the phenome calculation tasks.
*
* @param inputs The inputs to the phenome calculation tasks.
* @returns A matrix of phenome results, where each row corresponds to a single genome.
*/
protected execTasks(inputs: TTaskConfig[]): Promise<GenerationPhenomeMatrix>;
}