LightVoting
|
Created by sophie on 24.04.17. More...
Public Member Functions | |
CGroup (final CVotingAgent p_votingAgent, final String p_grouping) | |
constructor More... | |
void | addCoordinated (final CVotingAgent p_votingAgent) |
add voting agent (for coordinated grouping) More... | |
void | addRandom (final CVotingAgent p_votingAgent) |
add voting agent (for random grouping) More... | |
CVotingAgent | determineAgent (final String p_agentName) |
determine agent for given name More... | |
boolean | electionInProgress () |
boolean | finale () |
ILiteral | literal (final CVotingAgent p_votingAgent) |
returns literal representation for voting agent More... | |
ILiteral | literal (final CChairAgent p_chairAgent) |
returns literal representation for chair agent, is null if the chair is not the chair of the group More... | |
void | makeReady () |
boolean | open () |
boolean | readyForElection () |
void | remove (final CVotingAgent p_votingAgent) |
void | reopen () |
reopen group unless capacity is reached More... | |
void | reset () |
reset group More... | |
BitVector | result () |
return current result More... | |
int | size () |
return size More... | |
void | startProgress () |
void | triggerAgents (final CChairAgent p_chairAgent) |
trigger agents in group More... | |
ILiteral | updateBasic (final CChairAgent p_chairAgent, final BitVector p_result) |
update group literal for chair agent ( for random grouping ) More... | |
ILiteral | updateIterative (final CChairAgent p_chairAgent, final BitVector p_result, final int p_iteration) |
update group literal for chair agent ( for random grouping ) More... | |
Private Attributes | |
final List< CVotingAgent > | m_agentList |
final int | m_capacity = 3 |
final CChairAgent | m_chair |
boolean | m_inProgress |
boolean | m_open |
boolean | m_readyForElection |
BitVector | m_result |
Definition at line 42 of file CGroup.java.
org.lightvoting.simulation.environment.CGroup.CGroup | ( | final CVotingAgent | p_votingAgent, |
final String | p_grouping | ||
) |
p_votingAgent | voting agent creating the group |
p_grouping | grouping algorithm |
Definition at line 62 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_agentList, org.lightvoting.simulation.environment.CGroup.m_chair, org.lightvoting.simulation.environment.CGroup.m_inProgress, org.lightvoting.simulation.environment.CGroup.m_open, org.lightvoting.simulation.environment.CGroup.m_readyForElection, and org.lightvoting.simulation.environment.CGroup.m_result.
void org.lightvoting.simulation.environment.CGroup.addCoordinated | ( | final CVotingAgent | p_votingAgent | ) |
p_votingAgent | joining voting agent |
Definition at line 131 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_open, and org.lightvoting.simulation.environment.CGroup.m_readyForElection.
void org.lightvoting.simulation.environment.CGroup.addRandom | ( | final CVotingAgent | p_votingAgent | ) |
p_votingAgent | joining voting agent |
Definition at line 115 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_agentList, org.lightvoting.simulation.environment.CGroup.m_capacity, org.lightvoting.simulation.environment.CGroup.m_open, and org.lightvoting.simulation.environment.CGroup.m_readyForElection.
CVotingAgent org.lightvoting.simulation.environment.CGroup.determineAgent | ( | final String | p_agentName | ) |
p_agentName | name |
Definition at line 286 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_agentList.
boolean org.lightvoting.simulation.environment.CGroup.electionInProgress | ( | ) |
Definition at line 150 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_inProgress.
boolean org.lightvoting.simulation.environment.CGroup.finale | ( | ) |
Definition at line 271 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_capacity.
ILiteral org.lightvoting.simulation.environment.CGroup.literal | ( | final CVotingAgent | p_votingAgent | ) |
p_votingAgent | voting agent |
Definition at line 82 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_chair, and org.lightvoting.simulation.environment.CGroup.m_result.
ILiteral org.lightvoting.simulation.environment.CGroup.literal | ( | final CChairAgent | p_chairAgent | ) |
p_chairAgent | chair agent |
Definition at line 93 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_agentList, and org.lightvoting.simulation.environment.CGroup.m_chair.
void org.lightvoting.simulation.environment.CGroup.makeReady | ( | ) |
Definition at line 276 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_readyForElection.
boolean org.lightvoting.simulation.environment.CGroup.open | ( | ) |
Definition at line 145 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_open.
boolean org.lightvoting.simulation.environment.CGroup.readyForElection | ( | ) |
Definition at line 106 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_readyForElection.
Referenced by org.lightvoting.simulation.agent.CChairAgent.checkConditions().
void org.lightvoting.simulation.environment.CGroup.remove | ( | final CVotingAgent | p_votingAgent | ) |
Definition at line 140 of file CGroup.java.
void org.lightvoting.simulation.environment.CGroup.reopen | ( | ) |
Definition at line 252 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_agentList, org.lightvoting.simulation.environment.CGroup.m_capacity, and org.lightvoting.simulation.environment.CGroup.m_open.
void org.lightvoting.simulation.environment.CGroup.reset | ( | ) |
Definition at line 243 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_inProgress, and org.lightvoting.simulation.environment.CGroup.m_readyForElection.
BitVector org.lightvoting.simulation.environment.CGroup.result | ( | ) |
Definition at line 265 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_result.
int org.lightvoting.simulation.environment.CGroup.size | ( | ) |
Definition at line 182 of file CGroup.java.
Referenced by org.lightvoting.simulation.agent.CChairAgent.removeVoter().
void org.lightvoting.simulation.environment.CGroup.startProgress | ( | ) |
Definition at line 155 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_inProgress.
void org.lightvoting.simulation.environment.CGroup.triggerAgents | ( | final CChairAgent | p_chairAgent | ) |
p_chairAgent | chair agent |
Definition at line 164 of file CGroup.java.
ILiteral org.lightvoting.simulation.environment.CGroup.updateBasic | ( | final CChairAgent | p_chairAgent, |
final BitVector | p_result | ||
) |
p_chairAgent | chair agent |
p_result | election result |
Definition at line 194 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_result.
Referenced by org.lightvoting.simulation.agent.CChairAgent.computeResult().
ILiteral org.lightvoting.simulation.environment.CGroup.updateIterative | ( | final CChairAgent | p_chairAgent, |
final BitVector | p_result, | ||
final int | p_iteration | ||
) |
p_chairAgent | chair agent |
p_result | election result |
p_iteration | current iteration |
Definition at line 219 of file CGroup.java.
References org.lightvoting.simulation.environment.CGroup.m_result.
Referenced by org.lightvoting.simulation.agent.CChairAgent.computeResult().
|
private |
Definition at line 44 of file CGroup.java.
Referenced by org.lightvoting.simulation.environment.CGroup.addRandom(), org.lightvoting.simulation.environment.CGroup.CGroup(), org.lightvoting.simulation.environment.CGroup.determineAgent(), org.lightvoting.simulation.environment.CGroup.literal(), and org.lightvoting.simulation.environment.CGroup.reopen().
|
private |
Definition at line 46 of file CGroup.java.
Referenced by org.lightvoting.simulation.environment.CGroup.addRandom(), org.lightvoting.simulation.environment.CGroup.finale(), and org.lightvoting.simulation.environment.CGroup.reopen().
|
private |
Definition at line 48 of file CGroup.java.
Referenced by org.lightvoting.simulation.environment.CGroup.CGroup(), and org.lightvoting.simulation.environment.CGroup.literal().
|
private |
Definition at line 55 of file CGroup.java.
Referenced by org.lightvoting.simulation.environment.CGroup.CGroup(), org.lightvoting.simulation.environment.CGroup.electionInProgress(), org.lightvoting.simulation.environment.CGroup.reset(), and org.lightvoting.simulation.environment.CGroup.startProgress().
|
private |
Definition at line 50 of file CGroup.java.
Referenced by org.lightvoting.simulation.environment.CGroup.addCoordinated(), org.lightvoting.simulation.environment.CGroup.addRandom(), org.lightvoting.simulation.environment.CGroup.CGroup(), org.lightvoting.simulation.environment.CGroup.open(), and org.lightvoting.simulation.environment.CGroup.reopen().
|
private |
Definition at line 54 of file CGroup.java.
Referenced by org.lightvoting.simulation.environment.CGroup.addCoordinated(), org.lightvoting.simulation.environment.CGroup.addRandom(), org.lightvoting.simulation.environment.CGroup.CGroup(), org.lightvoting.simulation.environment.CGroup.makeReady(), org.lightvoting.simulation.environment.CGroup.readyForElection(), and org.lightvoting.simulation.environment.CGroup.reset().
|
private |
Definition at line 52 of file CGroup.java.
Referenced by org.lightvoting.simulation.environment.CGroup.CGroup(), org.lightvoting.simulation.environment.CGroup.literal(), org.lightvoting.simulation.environment.CGroup.result(), org.lightvoting.simulation.environment.CGroup.updateBasic(), and org.lightvoting.simulation.environment.CGroup.updateIterative().