Protected ReadonlyballotsReadonlycandidatesStatic ReadonlyisStatic ReadonlyneedsStatic ReadonlyneedsReturn a matrix of duels from all the ballots
Result of the vote. The first item lists the winners of the vote.
For example this ranking means that Bear wins, Sheep is second and Lion third
[ [ 'Bear' ], [ 'Sheep' ], [ 'Lion' ] ]
ProtectedresolveApply tiebreakers sequentially to a set of tied candidates. Returns qualified survivors, eliminated losers, and a trace of each step. If unresolvable, all pending are returned as eliminated.
Return a new instance of the same method restricted to a subset of candidates. Ballots are filtered to remove candidates not in the subset; unranked candidates are NOT appended (preserves only opinions voters expressed).
ProtectedroundProtectedround
Each round:
The head-to-head step in (3) is implemented by prepending
tb(FirstPastThePost)to the tieBreakers array — so it will always appear as the first entry intieBreakSteps. Any additionaltieBreakersyou supply are applied after FPTP if the head-to-head itself ends in a tie.Electowiki: Bottom-Two-Runoff IRV