|
|||||||||
| 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
public abstract class RatedVotingSystem
Interface for any voting system that inputs a voter's ratings of the choices. Supplies implementations of voteRanking which call voteRating
| Field Summary |
|---|
| Fields inherited from class org.bolson.vote.VotingSystem |
|---|
debug, NO_VOTE, numc |
| Constructor Summary | |
|---|---|
RatedVotingSystem(int numCandidates)
|
|
| Method Summary | |
|---|---|
int |
voteRanking(int[] ranking)
Convert to Rating and pass to voteRating(); |
int |
voteRating(double[] rating)
|
int |
voteRating(int[] rating)
|
| Methods inherited from class org.bolson.vote.VotingSystem |
|---|
checkRatedVote, getDebugHTML, getDebugText, getNumberOfCandidates, getWinners, getWinners, getWinners, getWinners, htmlSummary, init, isValidRankedVote, isValidRatedVote, name, normalize, normalize, normalize, normalize, normalize, normalizeL2, normalizeL2, normalizeL2, normalizeL2, normalizeL2, stretch, toString, voteRating, voteRating |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RatedVotingSystem(int numCandidates)
| Method Detail |
|---|
public int voteRanking(int[] ranking)
voteRanking in class VotingSystemranking - An array int[numc].
ranking[i] is the ranking of choice i.
public int voteRating(int[] rating)
voteRating in class VotingSystemrating - An array int[numc].
rating[i] is the rating of choice i.
A rating can be any int value. Higher means more preferred.
NO_VOTE for unrated.
public int voteRating(double[] rating)
voteRating in class VotingSystemrating - An array int[N].
rating[i] is the rating of choice i.
A rating can be any int value. Higher means more preferred.
NO_VOTE for unrated.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||