1.4 KiB
1.4 KiB
public Election::getLoser
Description
public Election->getLoser ( [?string $method = null] ): CondorcetPHP\Condorcet\Candidate|array|null
Get the natural Condorcet loser if there is one. Alternatively you can get the loser(s) from an advanced Condorcet algorithm.
method: ?string
Only if not nulle:
The loser will be provided by an advanced algorithm of an available advanced Condorcet method. For most of them, it will be the same as the Condorcet Marquis there. But if it does not exist, it may be different; and in some cases they may be multiple.
If null, Natural Condorcet algorithm will be use.
Return value:
(CondorcetPHP\Condorcet\Candidate|array|null
) Candidate object given. Null if there are no available winner or loser.
If you use an advanced method instead of Natural, you can get an array with multiples losers.
Throw an exception on error.