From 5bc16fbbc99d2d066e366ec1be27ac3c13b348a2 Mon Sep 17 00:00:00 2001 From: mikefranze <41272412+mikefranze@users.noreply.github.com> Date: Fri, 15 Dec 2023 14:57:58 -0800 Subject: [PATCH] formatting --- domain_model/ITabulators.ts | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/domain_model/ITabulators.ts b/domain_model/ITabulators.ts index 58e8f566..92087a3c 100644 --- a/domain_model/ITabulators.ts +++ b/domain_model/ITabulators.ts @@ -24,8 +24,11 @@ export interface fiveStarCount { } type scoreHist = number[][] + type rankHist = number[][] + type preferenceMatrix = number[][] + type pairwiseMatrix = number[][] interface genericSummaryData { @@ -35,7 +38,6 @@ interface genericSummaryData { nInvalidVotes: number, nUnderVotes: number, nBulletVotes?: number - } export interface starSummaryData extends genericSummaryData { @@ -44,22 +46,24 @@ export interface starSummaryData extends genericSummaryData { pairwiseMatrix: pairwiseMatrix, } -export interface allocatedScoreSummaryData extends starSummaryData{ +export interface allocatedScoreSummaryData extends starSummaryData { splitPoints: number[], - spentAboves: number[], + spentAboves: number[], weight_on_splits: number[], weightedScoresByRound: number[][] } -export interface approvalSummaryData extends genericSummaryData {} -export interface pluralitySummaryData extends genericSummaryData { -} +export interface approvalSummaryData extends genericSummaryData { } + +export interface pluralitySummaryData extends genericSummaryData { } export interface rankedRobinSummaryData extends genericSummaryData { rankHist: rankHist, preferenceMatrix: preferenceMatrix, pairwiseMatrix: pairwiseMatrix, } -export interface irvSummaryData extends rankedRobinSummaryData {} + +export interface irvSummaryData extends rankedRobinSummaryData { } + export interface roundResults { winners: candidate[], runner_up: candidate[], @@ -77,6 +81,7 @@ interface genericResults { export interface starResults extends genericResults { summaryData: starSummaryData, } + export interface allocatedScoreResults extends Omit { tied: candidate[][], summaryData: allocatedScoreSummaryData, @@ -85,12 +90,15 @@ export interface allocatedScoreResults extends Omit { export interface approvalResults extends genericResults { summaryData: approvalSummaryData, } + export interface pluralityResults extends genericResults { summaryData: pluralitySummaryData, } + export interface rankedRobinResults extends genericResults { summaryData: rankedRobinSummaryData, } + export interface irvResults extends Omit { summaryData: rankedRobinSummaryData, logs: string[],