/** * Pairwise Comparison utility module. * * Provides schedule generation for head-to-head matchups and * Bradley-Terry MLE estimation for computing priority scores. */ export interface PairwiseMatchup { matchupIndex: number; leftValue: string; rightValue: string; } export interface PairwiseMatchupAnswer { matchupIndex: number; leftValue: string; rightValue: string; winnerValue: string; } /** * Generate a pairwise comparison schedule for the given items. * * - If S <= 8: generates ALL S*(S-1)/2 unique pairs (Req 15.1) * - If S > 8: generates a balanced subset where each item appears * approximately equally (Req 15.2) * * @param itemValues Array of item value strings advancing to the Pairwise step * @returns Array of PairwiseMatchup objects */ export declare function generatePairwiseSchedule(itemValues: string[]): PairwiseMatchup[]; /** * Compute Bradley-Terry scores from pairwise matchup results using * iterative maximum likelihood estimation. * * The Bradley-Terry model estimates a "strength" parameter for each item * such that P(i beats j) = strength_i / (strength_i + strength_j). * * If MLE does not converge within 100 iterations, falls back to raw * win-rate proportions. * * @param matchups Array of completed matchup answers * @returns Map of item value → score, sorted by score descending (Req 7.7) */ export declare function computeBradleyTerryScores(matchups: PairwiseMatchupAnswer[]): Map;