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.


Field Summary
 double ambition
           
 boolean inCongress
           
 boolean isCandidate
           
 boolean isCoalition
           
 double laziness
           
 Candidate myCandidate
           
 
Fields inherited from class Individual
ideology, name, parent, partyTag, strengths, votingRecord
 
Constructor Summary
Voter(int policies, int positions, int tagLength, int center, int numberOfBills, java.lang.String name)
           
 
Method Summary
 double findUtility(Candidate tempCand)
           
 double findUtility(int[] tempIdeo)
           
 void tagAdapt()
           
 int vote(java.util.Vector CandidatePool, boolean election)
           
 
Methods inherited from class Individual
CrunchTag, findSeparation, findSimilarity, fliptag, levelIndex, showIdeology, showRecord, showTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ambition

public double ambition

myCandidate

public Candidate myCandidate

isCandidate

public boolean isCandidate

inCongress

public boolean inCongress

isCoalition

public boolean isCoalition

laziness

public double laziness
Constructor Detail

Voter

public Voter(int policies,
             int positions,
             int tagLength,
             int center,
             int numberOfBills,
             java.lang.String name)
Method Detail

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()