|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.bolson.vote.VotingSystem
org.bolson.vote.RatedVotingSystem
org.bolson.vote.Condorcet
org.bolson.vote.RankedPairs
public class RankedPairs
Implements the Ranked Pairs method of ranked voting tabulation. It is much like Condorcet.
| Nested Class Summary | |
|---|---|
protected static class |
RankedPairs.Pair
|
| Field Summary |
|---|
| Fields inherited from class org.bolson.vote.Condorcet |
|---|
talley |
| Fields inherited from class org.bolson.vote.VotingSystem |
|---|
debug, NO_VOTE, numc |
| Constructor Summary | |
|---|---|
RankedPairs(int nc)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getDebugText(java.lang.String[] names)
Return textual representation of debug data. |
int[] |
getWinners()
Do processing if necessary, return winners. |
java.lang.String |
name()
Return name of this voting system. |
| Methods inherited from class org.bolson.vote.Condorcet |
|---|
countDefeats, getSchwartzSet, getSchwartzSet, getSchwartzSet, getSchwartzSet, getWinnersCSSD, getWinnersOldBPM, getWinnersSchwartzEqOne, getWinnersSimpleIfOne, htmlSummary, htmlTable, init, toString, toString, verifySchwartzSet, verifySchwartzSet, verifySchwartzSet, voteRating, voteRating, voteRating |
| Methods inherited from class org.bolson.vote.RatedVotingSystem |
|---|
voteRanking |
| Methods inherited from class org.bolson.vote.VotingSystem |
|---|
checkRatedVote, getDebugHTML, getNumberOfCandidates, getWinners, getWinners, getWinners, isValidRankedVote, isValidRatedVote, normalize, normalize, normalize, normalize, normalize, normalizeL2, normalizeL2, normalizeL2, normalizeL2, normalizeL2, stretch, voteRating |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RankedPairs(int nc)
| Method Detail |
|---|
public int[] getWinners()
VotingSystemIt is recommended to cache the return value in such a way that calling this function again does not do complex recalculation. That cache should be cleared if voteRating or voteRanking is called.
getWinners in class Condorcetpublic java.lang.String getDebugText(java.lang.String[] names)
VotingSystem
getDebugText in class Condorcetnames - Symbolic names for the choices makes human debugging easier. May be null.
VotingSystem.debugpublic java.lang.String name()
VotingSystem
name in class Condorcet
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||