import type { WeightingFunctionFactory } from "./WeightingFunctionFactory"; import type { Pool } from "../pool"; import type { BoxFactory } from "./BoxFactory"; import type { CubicBCFactory } from "./CubicBCFactory"; import { WeightingFunctionName } from "./WeightingFunctionName"; /** * Weighting function factories pool key map. */ export interface WeightingFunctionFactoriesPoolKeyMap { [WeightingFunctionName.BOX]: BoxFactory; [WeightingFunctionName.CUBIC_BC]: CubicBCFactory; [key: string]: WeightingFunctionFactory; } /** * Utility type for inference of weighting function factory arguments type by its name. */ export type GetWeightingFunctionFactoryArgs = K extends keyof WeightingFunctionFactoriesPoolKeyMap ? WeightingFunctionFactoriesPoolKeyMap[K] extends WeightingFunctionFactory ? A : number[] : number[]; /** * Weighting function factories pool. */ export type WeightingFunctionFactoriesPool = Pool;