|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bolson.vote.NameVotingSystem org.bolson.vote.NamedVRR
public class NamedVRR
Virtual Round Robin election (Condorcet).
Nested Class Summary | |
---|---|
protected static class |
NamedVRR.Count
|
Nested classes/interfaces inherited from class org.bolson.vote.NameVotingSystem |
---|
NameVotingSystem.NameVote, NameVotingSystem.ReverseComparator |
Constructor Summary | |
---|---|
NamedVRR()
|
Method Summary | |
---|---|
protected NamedVRR.Count |
getCount(java.lang.String name)
|
protected NamedVRR.Count[] |
getIndexedCounts(boolean ldebug)
|
protected static int[] |
getTallyArray(NamedVRR.Count[] they)
build a tally array like Condorcet class uses, easier to use that code with |
NameVotingSystem.NameVote[] |
getWinners()
find Condorcet winner with CSSD cycle resolution |
NameVotingSystem.NameVote[] |
getWinnersCSSD(NamedVRR.Count[] they,
int[] tally)
|
java.lang.StringBuffer |
htmlSummary(java.lang.StringBuffer sb)
Get HTML summary of voting system state. |
int |
init(java.lang.String[] argv)
Set options for voting system. |
protected static NameVotingSystem.NameVote[] |
makeWinners(NamedVRR.Count[] they,
int[] defeatCount)
|
java.lang.String |
name()
|
void |
voteRating(NameVotingSystem.NameVote[] vote)
counts the names voted. |
Methods inherited from class org.bolson.vote.NameVotingSystem |
---|
defaultMain, denibble, depercentHexify, fromUrlEncoded, getDebug, getImplNames, getIpmlForName, htmlExplain, htmlExplain, htmlSummary, nameEqStrToVoteArray, nameEqStrToVoteArray, percentHexify, readVotes, registerImpl, resultsHTMLDisplay, sort, urlEncode, voteNameEqStr, voteOrderSpec, voteRating, voteSpecToNameVoteArray, winnerSummaryHTMLTable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NamedVRR()
Method Detail |
---|
public int init(java.lang.String[] argv)
NameVotingSystem
init
in class NameVotingSystem
argv
- array of options, just like main()
public void voteRating(NameVotingSystem.NameVote[] vote)
voteRating
in class NameVotingSystem
vote
- a set of (name,rating) pairsNameVotingSystem.voteRating(Map)
protected static NameVotingSystem.NameVote[] makeWinners(NamedVRR.Count[] they, int[] defeatCount)
public NameVotingSystem.NameVote[] getWinners()
getWinners
in class NameVotingSystem
protected NamedVRR.Count[] getIndexedCounts(boolean ldebug)
public java.lang.StringBuffer htmlSummary(java.lang.StringBuffer sb)
NameVotingSystem
htmlSummary
in class NameVotingSystem
sb
- a valid StringBuffer to which HTML summary will be appended.
public java.lang.String name()
name
in class NameVotingSystem
protected NamedVRR.Count getCount(java.lang.String name)
protected static int[] getTallyArray(NamedVRR.Count[] they)
public NameVotingSystem.NameVote[] getWinnersCSSD(NamedVRR.Count[] they, int[] tally)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |