|
LightVoting
|
Created by sophie on 10.01.17. More...
Collaboration diagram for org.lightvoting.simulation.rule.CMinisumApproval:Public Member Functions | |
| BitVector | applyRuleBV (final List< String > p_alternatives, final List< BitVector > p_votes, final int p_comSize) |
| compute the winning committee according to Minisum Approval More... | |
| Map< Integer, Integer > | sortMapDESC (final Map< Integer, Integer > p_valuesMap) |
| sort HashMap according to its values in descending order More... | |
Private Attributes | |
| List< String > | m_alternatives |
| List< BitVector > | m_bitVotes |
| BitVector | m_comBV |
| int | m_comSize |
Computes result of election according to Minisum Approval voting rule. re-used code from http://stackoverflow.com/questions/8119366/sorting-hashmap-by-values
Definition at line 47 of file CMinisumApproval.java.
| BitVector org.lightvoting.simulation.rule.CMinisumApproval.applyRuleBV | ( | final List< String > | p_alternatives, |
| final List< BitVector > | p_votes, | ||
| final int | p_comSize | ||
| ) |
| p_alternatives | available alternatives |
| p_votes | submitted votes |
| p_comSize | size of committee to be elected |
Definition at line 68 of file CMinisumApproval.java.
References org.lightvoting.simulation.rule.CMinisumApproval.m_alternatives, org.lightvoting.simulation.rule.CMinisumApproval.m_bitVotes, org.lightvoting.simulation.rule.CMinisumApproval.m_comBV, and org.lightvoting.simulation.rule.CMinisumApproval.m_comSize.
| Map<Integer, Integer> org.lightvoting.simulation.rule.CMinisumApproval.sortMapDESC | ( | final Map< Integer, Integer > | p_valuesMap | ) |
| p_valuesMap | HashMap with Approval scores |
Definition at line 121 of file CMinisumApproval.java.
|
private |
Definition at line 51 of file CMinisumApproval.java.
Referenced by org.lightvoting.simulation.rule.CMinisumApproval.applyRuleBV().
|
private |
Definition at line 57 of file CMinisumApproval.java.
Referenced by org.lightvoting.simulation.rule.CMinisumApproval.applyRuleBV().
|
private |
Definition at line 55 of file CMinisumApproval.java.
Referenced by org.lightvoting.simulation.rule.CMinisumApproval.applyRuleBV().
|
private |
Definition at line 53 of file CMinisumApproval.java.
Referenced by org.lightvoting.simulation.rule.CMinisumApproval.applyRuleBV().