org.bolson.vote
Class InstantProxy
java.lang.Object
org.bolson.vote.InstantProxy
public class InstantProxy
- extends java.lang.Object
A proxy is an integer triplet: ( voter uid, proxy uid, priority )
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InstantProxy
public InstantProxy()
proxyIndex
public static int proxyIndex(InstantProxy.Card cur,
int[] uids)
proxyIndex
public static int proxyIndex(InstantProxy.Card cur,
int[] uids,
InstantProxy.Card[] proxies,
boolean[] active)
- recursive version, for breadth first search, stops when none active
getInstantProxyMultipliers
public static int[] getInstantProxyMultipliers(InstantProxy.Card[] proxies,
int[] uids)
- Determine how the votes cast get multiplied by receiving proxy votes.
- Parameters:
proxies
- proxies to process. must be sorted on uid.uids
- user ids of those who cast votes. Must be sorted to allow binary search.
explainVote
public static java.lang.String explainVote()
readIntFile
public static int[] readIntFile(java.io.Reader r)
main
public static void main(java.lang.String[] argv)