technically-php/linear-partitioning
最新稳定版本:1.0.2
Composer 安装命令:
composer require technically-php/linear-partitioning
包简介
A simple library to solve linear partition problem with Dynamic Programming approach
README 文档
README
Based on a description from The Algorithm Design Manual book by Steven S. Skiena.
- Leverages the Dynamic Programming principle
- O(n²) complexity
- Fully annotated code
- Test suite
- Semver
Installation
composer require technically-php/linear-partitioning:^1.0
Usage
use \TechnicallyPhp\LinearPartitioning\LinearPartitioning; $items = [100, 200, 300, 400, 500, 600, 700, 800, 900]; $ranges = LinearPartitioning::partition($items, 3); var_dump($ranges); // [ [100, 200, 300, 400, 500], [600, 700], [800, 900] ]
Credits
- Implemented by Ivan Voskoboinyk
统计信息
- 总下载量: 157.37k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-20