UNPKG

@nrk/valg-valgomat-algoritme

Version:

The algorithm used to calculate distance between sets of positions for NRKs Valgomat

12 lines (7 loc) 278 B
export type PositionValue = -2 | -1 | 1 | 2 export type Positions = { [key: string]: PositionValue | null } export type PositionsMap<T extends string> = Record<T, Positions> export type PositionVector = [string, PositionValue | null] export as namespace ValgomatAlgoritme