【文件属性】:
文件名称:cartesian-product:内存高效的笛卡尔积实现
文件大小:6KB
文件格式:ZIP
更新时间:2021-06-02 21:53:50
PHP
笛卡尔积
内存高效的笛卡尔积实现。
它使用迭代器以便在不影响内存占用的情况下仅存储特定的元组,从而能够计算甚至较大的组合。
安装
通过作曲家
$ composer require th3n3rd/cartesian-product
用法
use Nerd \ CartesianProduct \ CartesianProduct ;
$ cartesianProduct = new CartesianProduct ();
$ cartesianProduct
-> appendSet ( array ( 'a' , 'b' , 'c' ))
-> appendSet ( array ( 'd' , 'e' ))
-> appendSet ( array ( 'f' , 'g' , 'h' ))
-> appendSet ( array ( 'i' ,
【文件预览】:
cartesian-product-master
----src()
--------CartesianProduct.php(3KB)
--------Set.php(1KB)
----examples()
--------iterator.php(1KB)
--------memory-usage-comparison.php(1KB)
--------whole-result.php(1KB)
----LICENSE(1KB)
----README.md(2KB)
----composer.json(657B)