承接 mieuxvoter/majority-judgment 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mieuxvoter/majority-judgment

最新稳定版本:1.0.3

Composer 安装命令:

composer require mieuxvoter/majority-judgment

包简介

Deliberate your polls using Majority Judgment with a fast, robust, interface-oriented and scalable algorithm.

README 文档

README

Deliberate majority judgment polls ⚖.

Features

  • Majority judgment deliberation from merit profiles
  • Score based, efficiency should scale well (algo is parallelizable)
  • Interface-oriented, test-driven code
  • Extensible to get other judgments (usual, central, etc.)
  • Made by MieuxVoter's volunteers

Usage example

Require it in your own project, using composer:

composer require mieuxvoter/majority-judgment

Use it:

use MieuxVoter\MajorityJudgment\MajorityJudgmentDeliberator;
use MieuxVoter\MajorityJudgment\Model\Settings\MajorityJudgmentSettings;
use MieuxVoter\MajorityJudgment\Model\Tally\ArrayPollTally;

$tally = new ArrayPollTally([
    'Proposal A' => [1, 1, 4, 3, 7, 4, 1], // amount of judgments for each grade
    'Proposal B' => [0, 2, 4, 6, 4, 2, 3], // (worst grade to best grade)
]);

$deliberator = new MajorityJudgmentDeliberator();

$result = $deliberator->deliberate($tally);
// $result is a PollResultInterface

foreach($result->getProposalResults() as $proposalResult) {
    // … Do something
    print($proposalResult->getProposal());
    print($proposalResult->getRank());
}

Interface-oriented

Any object implementing PollTallyInterface may be used as input.

Testing

See the tests in test/.

composer install --dev
vendor/phpunit/phpunit/phpunit -v test

统计信息

  • 总下载量: 107
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 6
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-05-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固