Download the PHP package julien-boudry/condorcet without Composer

On this page you can find all versions of the php package julien-boudry/condorcet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package condorcet

Condorcet

Open in GitHub Codespaces

Packagist Docker Pulls Packagist Download GitHub contributors

Codacy Badge GitHub code size in bytes Codacy Badge Build Status

Main Author: Julien Boudry
License: say hello if you like or use this code!
Contribute: Contribution File
Donation: bc1q3jllk3qd9fjvvuqy07tawkv7t6h7qjf55fc2gh or GitHub Sponsor Page
You can also offer me a bottle of good wine.

Condorcet PHP

Presentation | Documentation Book | Tests

Condorcet is a powerful engine for managing electoral processes and calculating election results. It handles all aspects from configuration and vote collection to result calculation. The library natively implements over 20 voting methods compatible with preferential voting ballots, including Condorcet methods, Alternative Voting, STV, and many others. => See all supported voting methods

Two ways to use Condorcet:

Both approaches can handle massive numbers of votes (hundreds of millions) on modest hardware.

Summary

Project State and Specifications

Release Notes

Version PHP Requirements State Support
5.0 8.4 Stable support provided
4.7 8.3 Old Stable support provided
4.6 8.2 Old Stable not any support
3.x 8.1 Old Stable not any support
2.2 7.4 Old Stable support requiring some incentive
2.0 7.1 Old Stable not any support
1.0 5.6 Old Stable not any support
0.9x 5.5 Old Stable ❌ ℹ Since v0.90, you should consider then it's a new project (api, engine).
0.14 5.5 Old Stable ready for the museum

All versions require Json and Mbstring extensions (or polyfill). Pdo-Sqlite is recommended for elections with hundreds of thousands of votes or more.

Supported Voting Methods

Condorcet supports both "single-winner" methods (with full ranking extrapolation) and proportional representation systems.

Full details on voting methods, options, and implementation choices

Single-Winner Methods provided natively

Single-winner methods return a complete ranking of all candidates.

Deterministic

Condorcet / Borda (+ Nauru variant) / Copeland / Dodgson (2 Approximations) / FPTP / Instant-runoff (alternative vote) / Kemeny–Young / Minimax (+ variants) / Ranked Pairs (+ variants) / Schulze (+ variants)

Lotteries

Random Ballot / Random Candidates

Proportional Methods provided natively

Methods designed for electing multiple candidates to an assembly.

Single Transferable Vote (STV) / Comparison of Pairs of Outcomes by the Single Transferable Vote (CPO-STV) / Highest Averages Methods (Sainte-Laguë, Jefferson/D'Hondt, and variants) / Largest Remainder Methods (with different quotas)

Add your own voting method as a module

Condorcet features a modular architecture allowing easy extension with new algorithms:

Main Features

Although not primarily designed for maximum performance, Condorcet delivers predictable, linear scaling even with very large elections. While not formally certified, comprehensive test coverage ensures reliable results.


Use Condorcet as a command line application

Install as a command line application

Available installation methods:

Installation instructions for command line usage

Condorcet Book - Command Line

Use Condorcet as a PHP Library

Install / Autoloading

Uses namespace \CondorcetPHP\Condorcet

Installation options:

Installation instructions for PHP library usage

Library Manual

Complete Documentation Book

The documentation includes comprehensive examples illustrating the library's capabilities.

Class & API References

API Reference

PHP Library - Examples

Overview Examples:

HTML Output Examples:

Specific Examples:

Performance & Coding Style Considerations

Coding Standards:

The codebase follows PSR-12 with some flexibility, enforced via CS-Fixer throughLaravel Pint.

Performance:

Performance varies significantly between voting methods. See method benchmarks.

Kemeny-Young Performance:

Large Elections: For elections with 50,000+ votes, consider external storage to avoid memory constraints. Condorcet includes a PDO driver that works with standard relational databases to handle hundreds of millions of votes. A simple SQLite implementation is provided.

Custom storage drivers can be implemented for NoSQL or other storage systems.

See the documentation on handling large elections

Benchmarks run on a modern Linux x64 system with PHP 8.1 (CLI).

Roadmap for Further Releases

Related projects / They use Condorcet

List of known projects, add yours!


All versions of condorcet with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
ext-json Version *
ext-mbstring Version *
symfony/console Version ^7.1
symfony/yaml Version ^7.2
brick/math Version ^0.13
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package julien-boudry/condorcet contains the following files

Loading the files please wait ....