votes
    Preparing search index...

    Class BottomTwoRunoff<C>

    Each round:

    1. Rank remaining candidates by FPTP (first-choice votes).
    2. Take the bottom-2 candidates from that ranking.
    3. Eliminate whichever of the two loses a head-to-head FPTP matchup.

    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 in tieBreakSteps. Any additional tieBreakers you supply are applied after FPTP if the head-to-head itself ends in a tie.

    Type Parameters

    • C extends string

    Hierarchy

    • RoundBallotMethodTb<C>
      • BottomTwoRunoff
    Index
    • Type Parameters

      • C extends string

      Parameters

      • input: {
            ballots: Ballot<C>[];
            candidates: C[];
            tieBreakers?: TbEntry<C>[];
            unrankedLast?: boolean;
        }

      Returns BottomTwoRunoff<C>

    ballots: Ballot<C>[]
    candidates: C[]
    unrankedLast: boolean
    isRandom: boolean = false
    needsBallot: true
    needsMatrix: boolean = false
    • The stored ballots re-normalized against a subset of candidates, honoring this method's unrankedLast setting. Round-based methods use this to restrict ballots to the candidates still in the running.

      Parameters

      • candidates: C[]

      Returns Ballot<C>[]

    • Returns C[][]

    • Ranking built by repeated wins instead of the method's own full ranking: run the method, record the winning tier, then re-run it restricted to the remaining candidates for the next place, and so on.

      Differs from ranking() whenever the method's full ranking disagrees with how it ranks subsets — e.g. instant runoff orders losers by elimination time, while iterating re-elects a winner at every place.

      Returns C[][]

    • 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' ] ]

      Returns C[][]

    • Apply 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.

      Parameters

      • pending: C[]

      Returns { eliminated: C[]; qualified: C[]; tieBreakSteps: TieBreakStep<C>[] }

    • 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).

      Type Parameters

      • D extends string

      Parameters

      • candidates: D[]

      Returns BallotMethod<D>

    • Type Parameters

      • D extends string

      Parameters

      • candidates: D[]

      Returns D[][]