定制 crimson-nynja/php-trees 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

crimson-nynja/php-trees

Composer 安装命令:

composer require crimson-nynja/php-trees

包简介

PHP implementation of various Trees

README 文档

README

GitHub Workflow build status badge Latest Stable Version

This repo is designed to have all common trees used in an easy to use php way

Current included are implementations of a Binary Search Tree, Rope, Binary Heap, and a Generic Tree, with more to come!

All tests are written in PHP Unit, and all code is written in the PSR-4 standards. Php Trees also requires PHP 8.1.0 or above, and utilizes all modern features of PHP.

PHP Trees can be installed through composer with

composer require crimson-nynja/php-trees

https://packagist.org/packages/crimson-nynja/php-trees

Usage

To use the binary search tree, include the correct file and create it as such

use PhpTrees\BinarySearchTree;

$b = new BinarySearchTree(rootValue: 5);
// This will create a binary search tree with a root of the value 5

To use the Rope

use PhpTrees\Rope;

$r = new Rope(string: "This is a Rope!");
// This will create a Rope with the initial string, "This is a Rope!"

To use the Binary Heap

use PhpTrees\BinaryHeap;

$h = new BinaryHeap();
// This will create an empty binary heap

To use the Generic Tree

use PhpTrees\GenericTree;

$g = new GenericTree(rootValue: 4.1);
// This will create a generic tree with root 4.1

For a more detailed description of the features of PHP Trees, check out the wiki
https://github.com/CrimsonNynja/PHP-Trees/wiki

Coming up

tree balancing options
2-3 tree
B-Tree
search/traversal types (depth first search breadth first search, etc)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2019-11-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固