承接 chdemko/sorted-collections 相关项目开发

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

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

chdemko/sorted-collections

最新稳定版本:1.0.10

Composer 安装命令:

composer require chdemko/sorted-collections

包简介

Sorted Collections for PHP >= 8.2

README 文档

README

PHP package Coveralls Scrutinizer Code Climate CodeFactor Codacy PHP versions Latest Stable Version Downloads Latest Unstable Version License Last commit Documentation Status Repo Size Code Size

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:

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.

All releases can be found here

统计信息

  • 总下载量: 2.33M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 22
  • 点击次数: 0
  • 依赖项目数: 5
  • 推荐数: 0

GitHub 信息

  • Stars: 22
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2026-01-04