Recommend this page to a friend! |
Download .zip |
Info | View files (3) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2007-07-01 (9 years ago) | Not enough user ratings | Total: 289 This week: 1 | All time: 7,068 This week: 1,047 |
Version | License | PHP version | Categories | |||
calculadoraescons 1.1 | GNU General Publi... | 5.0 | Algorithms |
Description | Author | ||||||||||||||
This class can be used to calculate the number of seats assigned to a party upon election results using the D'Hondt method. Innovation Award |
|
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 |
Files |
File | Role | Description |
---|---|---|
CalculadoraEscons.php | Class | Class CalculdoraEscons |
exemple.php | Example | Sample file |
README | Doc. | README |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.