Class Voter
java.lang.Object
|
+--Individual
|
+--Voter
- public class Voter
- extends Individual
Voters are the foundation of our model. Each Voter has a utility function,
used to determine the candidate that best matches their ideological
viewpoints. Voters also adapt their tag to match the candidate they
choose.
|
Constructor Summary |
Voter(int policies,
int positions,
int tagLength,
int center,
int numberOfBills,
java.lang.String name)
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ambition
public double ambition
myCandidate
public Candidate myCandidate
isCandidate
public boolean isCandidate
inCongress
public boolean inCongress
isCoalition
public boolean isCoalition
laziness
public double laziness
Voter
public Voter(int policies,
int positions,
int tagLength,
int center,
int numberOfBills,
java.lang.String name)
findUtility
public double findUtility(Candidate tempCand)
findUtility
public double findUtility(int[] tempIdeo)
vote
public int vote(java.util.Vector CandidatePool,
boolean election)
tagAdapt
public void tagAdapt()