rbdwllr/automata
Composer 安装命令:
composer require rbdwllr/automata
包简介
An Elementary Cellular Automata library for PHP.
README 文档
README
Automata
An Elementary Cellular Automata library for PHP. All credit goes to Stephen Wolfram and Melanie Mitchell.
Basic Usage
use Automata\Automata; $automata = new Automata(); $result = $automata->generate(110, 4, '01010'); $result->toArray();
Advanced Usage
use Automata\CellsFactory; use Automata\RulesFactory; use Automata\Iterator; $cellsFactory = new CellsFactory(); $cells = $cellsFactory->create("01010"); $rulesFactory = new RulesFactory(); $rules = $rulesFactory->create(110); $iterator = new Iterator(new Iterate(), $cells, $rules); $iterations = $iterator->iterate(4); $iterations->toArray();
Rules
000 = 0
001 = 1
010 = 1
011 = 1
100 = 0
101 = 1
110 = 1
111 = 0
统计信息
- 总下载量: 41
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-08-31