Skip to content

Methods Stats ​

Reference

Result->stats

Format & Content ​

Likely to be documented in their dedicated documentation.

php
$electionWithVotes->getResult()->stats;

Verbosity ​

They can be very large and take a lot of space, because they are stored in the Result object. For this reason, different levels of verbosity can be implemented by the voting methods. By default, the standard level is used. The verbosity of a Result object is immmutable.

Verbosity level uses the enum StatsVerbosity.

php
use \CondorcetPHP\Condorcet\Algo\StatsVerbosity;
use CondorcetPHP\Condorcet\Election;

$electionWithVotes->statsVerbosity; // StatsVerbosity::STD

$electionWithVotes->setStatsVerbosity(StatsVerbosity::FULL);
$result = $electionWithVotes->getResult('Kemeny Young');

expect($electionWithVotes->statsVerbosity)->toBe(StatsVerbosity::FULL);
expect($result->statsVerbosity)->toBe(StatsVerbosity::FULL);

Released under the MIT License.