|
STAR++ v0.2.2
C++ implementation of STAR voting
|
The ExpectedElectionResult class compares the results of an election to a known outcome. More...
#include <star/expectedelectionresult.h>
Classes | |
| class | Builder |
| The ExpectedElectionResult::Builder class is a utility through expected election result sets can be created. More... | |
Public Member Functions | |
| ExpectedElectionResult () | |
| bool | isNull () const |
| bool | operator== (const ElectionResult &result) const |
| bool | sameOutcomeAs (const ElectionResult &result) |
| qsizetype | seatCount () const |
| QList< Seat > | seats () const |
This class is primarily useful for testing purposes.
| Star::ExpectedElectionResult::ExpectedElectionResult | ( | ) |
Constructs a null expected election result.
| bool Star::ExpectedElectionResult::isNull | ( | ) | const |
Returns true if the expected election result is null; otherwise, returns false.
| bool Star::ExpectedElectionResult::operator== | ( | const ElectionResult & | result | ) | const |
Returns true if this expected election result is the same as the election result result; otherwise, returns false.
| bool Star::ExpectedElectionResult::sameOutcomeAs | ( | const ElectionResult & | result | ) |
Returns true if the seat winners of this expected election result are the same as in the election result result; otherwise, returns false.
This method ignores any potential qualifier round differences between the results and only compares the final seat winners.
| qsizetype Star::ExpectedElectionResult::seatCount | ( | ) | const |
Returns the number of seats that are expected to have been evaluated.
| QList< Seat > Star::ExpectedElectionResult::seats | ( | ) | const |
Returns the list of expected evaluated seats.