|Last Updated||Ratings||Unique User Downloads||Download Rankings|
|2007-07-01 (10 years ago)||Not enough user ratings||Total: 296||All time: 7,131 This week: 561|
|calculadoraescons 1.1||GNU General Publi...||5.0||Algorithms|
This class can be used to calculate the number of seats assigned to a party upon election results using the D'Hondt method.
CalculadoraEscons is a class that calculates the number of seats belonging to each party in an election process, using the D'Hondt's method. To use this class you have to: 1.- Create an object: $aCalc = new CalculadoraEscons(); 2.- Call the class with the list of parties and votes collected by each of them, and the number of seats to distribute: $aPartits = array('CiU' => 4367,'PSC' => 2252, 'ERC' => 2131,'ICV' => 403,'PP' => 287,'IPE' => 234); $aEscons = $aCalc->calcula($aPartits,17); The "calcula" method returns an array where the keys are the names of the parties and the values are the seats assigned to them. 2005-05-21, Manel Zaera CalculadoraEscons is free software released under the GNU GPL license, la qual podeu consultar a http://www.gnu.org/copyleft/gpl.html
|Version Control||Unique User Downloads||Download Rankings|