Veto

class svvamp.Veto(population, **kwargs)[source]

Veto. Also called Antiplurality.

Inherits functions and optional parameters from superclasses ElectionResult and Election.

Example:
>>> import svvamp
>>> pop = svvamp.PopulationSpheroid(V=100, C=5)
>>> election = svvamp.Veto(pop)

Each voter votes against one candidate (veto). The candidate with least vetos is declared the winner. In case of a tie, the tied candidate with lowest index wins.

Sincere voters vote against their least-liked candidate.

not_IIA(): Non-polynomial or non-exact algorithms from superclass Election.

CM(), ICM(), IM(), TM(), UM(): Exact in polynomial time.

ballots

1d array of integers. ballots[v] is the candidate on voter v‘s ballot.

scores

1d array of integers. scores[c] is minus one times the number of vetos against candidate c.

w

Integer (winning candidate).

Default behavior in superclass ElectionResult:
The candidate with highest value in vector scores is declared the winner. In case of a tie, the tied candidate with lowest index wins.