/** * @fileoverview MPN (Most Probable Number) Lookup Tables and Functions * * This module provides lookup tables and functions for calculating Most Probable Number (MPN) * values for different types of microbiological testing: * * - Standard quantification (getQtMpn) * - 2000-well format high-throughput analysis (getQt2KMpn) * - Legionella-specific testing (getQtLegio) * * The arrays are kept as large static lookups for optimal performance and minimal memory usage. */ /** * MPN (Most Probable Number) result tuple * [0]: Lower bound (number or string like '<1.0') * [1]: Most probable number estimate * [2]: Upper bound (number or string like 'infinite') */ type MpnResult = [string | number, number, string | number]; /** * MPN lookup result - either a valid MPN tuple or undefined for invalid inputs */ type Mpn = MpnResult | undefined; /** Maximum index for standard MPN lookup (0-51) */ declare const MAX_QT_MPN_INDEX = 51; /** Maximum large position for 2K MPN lookup (0-49) */ declare const MAX_2K_LARGE_POS = 49; /** Maximum small position for 2K MPN lookup (0-48) */ declare const MAX_2K_SMALL_POS = 48; /** Maximum large position for Legionella MPN lookup (0-6) */ declare const MAX_LEGIO_LARGE_POS = 6; /** Maximum small position for Legionella MPN lookup (0-90) */ declare const MAX_LEGIO_SMALL_POS = 90; /** * Get MPN value for standard quantification based on positive well count * * @param inCount - Number of positive wells (0-51) * @returns MPN result tuple [lower_bound, estimate, upper_bound] or undefined if invalid * * @example * ```typescript * const result = getQtMpn(10); * if (result) { * const [lower, estimate, upper] = result; * console.log(`MPN: ${estimate} (${lower} - ${upper})`); * } * ``` */ declare const getQtMpn: (inCount: number) => Mpn; /** * Get MPN value for 2000-well format using large and small position indices * * @param inLargePos - Large position index (0-49) * @param inSmallPos - Small position index (0-48) * @returns MPN result tuple [lower_bound, estimate, upper_bound] or undefined if invalid * * @example * ```typescript * const result = getQt2KMpn(10, 25); * if (result) { * const [lower, estimate, upper] = result; * console.log(`2K MPN: ${estimate} (${lower} - ${upper})`); * } * ``` */ declare const getQt2KMpn: (inLargePos: number, inSmallPos: number) => Mpn; /** * Get MPN value for Legionella testing using large and small position indices * * Note: This function returns a single value from the flattened Legionella array, * not a tuple like the other MPN functions. The Legionella data structure is different. * * @param inLargePos - Large position index (0-6) * @param inSmallPos - Small position index (0-90) * @returns Single MPN value (string or number) or undefined if invalid * * @example * ```typescript * const result = getQtLegio(3, 45); * if (result !== undefined) { * console.log(`Legionella MPN: ${result}`); * } * ``` */ declare const getQtLegio: (inLargePos: number, inSmallPos: number) => string | number | undefined; export { MAX_2K_LARGE_POS, MAX_2K_SMALL_POS, MAX_LEGIO_LARGE_POS, MAX_LEGIO_SMALL_POS, MAX_QT_MPN_INDEX, type Mpn, type MpnResult, getQt2KMpn, getQtLegio, getQtMpn };