chdemko/sorted-collections
Composer 安装命令:
composer require chdemko/sorted-collections
包简介
Sorted Collections for PHP >= 8.4
README 文档
README
Sorted Collection for PHP. Insertion, search, and removal compute in
log(n) time where n is the number of items present in the collection.
It uses AVL threaded tree [see @Knuth97, 1:320, Sect. 2.3.1] as internal
structure.
@Knuth97: Donald E. Knuth, The Art of Computer Programming, Addison-Wesley, volumes 1 and 2, 2nd edition, 1997.
This project uses:
- PHP Code Sniffer for checking PHP code style
- PHPUnit for unit test (100% covered)
- Sphinx and Doxygen for the documentation
Instructions
Using composer: either
$ composer create-project chdemko/sorted-collections:1.0.*@dev; cd sorted-collections Creating a "chdemko/sorted-collections:1.0.*@dev" project at "./sorted-collections" ...
or create a composer.json file containing
{
"require": {
"chdemko/sorted-collections": "1.0.*@dev"
}
}
and run
$ composer install Loading composer repositories with package information ...
Create a test.php file containg
<?php require __DIR__ . '/vendor/autoload.php'; use chdemko\SortedCollection\TreeMap; $tree = TreeMap::create()->put( [1=>1, 9=>9, 5=>5, 2=>2, 6=>6, 3=>3, 0=>0, 8=>8, 7=>7, 4=>4] ); echo $tree . PHP_EOL;
And run
$ php test.php [0,1,2,3,4,5,6,7,8,9]
See the examples and benchmarks folders for more information.
Documentation
Run
$ sudo apt install doxygen python3-pip python3-virtualenv $ virtualenv venv $ venv/bin/activate (venv) $ pip install -r docs/requirements.txt (venv) $ sphinx-build -b html docs/ html/ (venv) $ deactivate $
if you want to create local documentation with Sphinx.
Citation
If you are using this project including publication in research activities, you have to cite it using (BibTeX format). You are also pleased to send me an email to chdemko@gmail.com.
- authors: Christophe Demko
- title: php-sorted-collections: a PHP library for handling sorted collections
- year: 2014
- how published: https://packagist.org/packages/chdemko/sorted-collections
All releases can be found here
chdemko/sorted-collections 适用场景与选型建议
chdemko/sorted-collections 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.66M 次下载、GitHub Stars 达 22, 最近一次更新时间为 2014 年 04 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「tree」 「iterator」 「map」 「set」 「collection」 「ordered」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 chdemko/sorted-collections 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 chdemko/sorted-collections 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 chdemko/sorted-collections 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Maps in minutes. Powered by the Google Maps API.
collection php library
Yii2 map input widget. Allows you to select geographcal coordinates via a human-friendly inteface.
jsTree widget for yii2
PHP PDO Mysql select statement iterator implemented as multiple queries using LIMIT clauses
Iteration tools for PHP
统计信息
- 总下载量: 2.66M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 22
- 点击次数: 34
- 依赖项目数: 5
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2014-04-07