Login   Register  
PHP Classes
elePHPant
Icontem

Class: Calculadora Escons

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Manel Zaera  >  Calculadora Escons  >  Download .tar.gz .zip  >  Support forum Support forum (1)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Calculadora Escons
Base name: calculadoraescons
Description: Calculate elected seats using D'Hondt method
Related classes: ,
Version: 1.1
PHP version: 5.0
License: GNU General Public License (GPL)
All time users: 224 users
All time rank: 5960
Week users: 0 users
Week rank: 2526
Picture of Manel Zaera
Author: Manel Zaera <e-mail contact>
Packages: 3 Browse this author's classes Browse this author's classes
Country: Spain Spain - PHP jobs in Spain
Age: 37
All time rank: 189143 in Spain Spain
Week rank: 2255 Down58 in Spain Spain Down
Innovation award
Innovation award
Nominee: 1x


  Detailed description  
This class can be used to calculate the number of seats assigned to a party upon election results using the D'Hondt method.

It takes as parameters the number of available seats and an associative array that relates each party with the votes they received.

The class distributes the available seats using the D'Hondt method and returns an associative arrays that relates each party with the number of assigned seats that they got.

The code and the comments are in Catalan.

 

  Groups  
Group folder image Algorithms Numerical and statistical algorithms View top rated classes

  Rate classes User ratings   Applications   Files Files  

  Innovation Award  
PHP Programming Innovation award nominee
June 2007
Number 10
The D'Hondt method is used in many countries to calculate the number of seats assigned to a party, depending on the percentage of votes that they get in elections.

This class provides an implementation of the D'Hondt method. It can be used by PHP sites that want to show on the Web the partial or final results of elections that take place on countries that use this method of assigning elected seats.

Manuel Lemos

  User ratings  
There are not enough user ratings to display for this class.

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Plain text file CalculadoraEscons.php Class Class CalculdoraEscons
Plain text file exemple.php Example Sample file
Plain text file README Doc. README

Download all files: calculadoraescons.tar.gz calculadoraescons.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.