diff --git a/etude/existant.md b/etude/existant.md index eda492b..cfd8721 100644 --- a/etude/existant.md +++ b/etude/existant.md @@ -18,7 +18,7 @@ https://en.wikipedia.org/wiki/Jugement_majoritaire |5|A Rejeter|Reject| -# Recherche des projets de code autours du jugement majoritaire sur githbu +# Recherche des projets de code autours du jugement majoritaire sur githbub |source|info|interet| |------------------|-----------------------------|-------------| @@ -33,8 +33,8 @@ https://en.wikipedia.org/wiki/Jugement_majoritaire # https://mieuxvoter.fr/en C'est la référence, les théoriciens du vote majoritaire ont été invités à participer à l'élaboration de ce site. +En fait inutile de chercher plus loin, il y a pratiquement tout dans ce dépot, avec de nombreuses librairies dans différents langages. -Par contre pour trouver la librairie de base... https://github.com/MieuxVoter/mieuxvoter.fr @@ -52,6 +52,59 @@ https://app.mieuxvoter.fr/fr/votes/ult-kxm-vzcr : même en français 'Very good' Obligation de noter tous les participants. +## Librairies + +Toutes les libraires ne se valent pas et n'ont pas la même interface. + +|java|https://github.com/MieuxVoter/majority-judgment-library-java| +|python|https://github.com/MieuxVoter/majority-judgment-library-python| +|go|https://github.com/MieuxVoter/majority-judgment-library-go| +|rust|https://github.com/MieuxVoter/majority-judgment-rust| +|typescript|https://github.com/MieuxVoter/majority-judgment-library-typescript| +|elixir|https://github.com/MieuxVoter/majority-judgment-library-elixir| +|dart|https://github.com/MieuxVoter/majority-judgment-library-dart| +|php|https://github.com/MieuxVoter/majority-judgment-library-php| + +## Librairie php + +https://github.com/MieuxVoter/majority-judgment-library-php + +fourni une interface extensible pour le 'Tally' PollTallyInterface + +``` +interface PollTallyInterface +{ + /** + * Total amount of Participants in the Poll. + * Participants are not required to give a Grade to each Proposal, + * so this information helps accounting for default Grades. + * + * @return int + */ + public function getParticipantsAmount() : int; + + /** + * Tallies for each Proposal. + * The order matters only in *perfect* equality scenarios. + * In these extreme cases, the order of ex-æquo proposals in the Result + * will reflect the order of proposals submitted here. + * + * You can make your own convenience class of use one of the provided, + * such as ArrayProposalTally. + * + * @return ProposalTallyInterface[] + */ + public function getProposalsTallies() : iterable; +} +``` + +composer require mieuxvoter/majority-judgment + +## Librairie java + +https://github.com/MieuxVoter/majority-judgment-library-java + + ## Librairie python https://github.com/MieuxVoter/majority-judgment-library-python @@ -75,6 +128,12 @@ Très courte ( ./majority_judgment/__init__.py 145 lignes ) /!\ Attention à l'ordre : par défaut le plus grand est le meilleur , il faut utiliser reverse=True pour l'inverser. +## Librairie go + +https://github.com/MieuxVoter/majority-judgment-library-go + +L'algorithme est plus efficace que celui de python : https://github.com/MieuxVoter/majority-judgment-library-python/pull/2 + ## API REST python https://github.com/MieuxVoter/majority-judgment-api-python @@ -99,6 +158,10 @@ profiles : Election Candidat Grade Vote +## Jeux de données + +https://github.com/MieuxVoter/mj-database-2027 + # david chavalarias https://github.com/davidchavalarias/jugement-majoritaire