组合,配置与在PHP置换 [英] Combinations, Dispositions and Permutations in PHP

查看:106
本文介绍了组合,配置与在PHP置换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是最有效的方式来生成所有组合,意向和阵列的排列在PHP?

What is the most efficient way to generate all the combinations, dispositions and permutations of an array in PHP?

推荐答案

下面是code让所有排列:

Here is code to get all permutations:

<一个href="http://www.php.net/manual/en/function.shuffle.php#90615">http://www.php.net/manual/en/function.shuffle.php#90615

使用的code键得到的幂集,置换是那些最大长度的,电源组应当是所有组合。我不知道是什么性格的,所以如果你能解释它们,这将有助于。

With the code to get the power set, permutations are those of maximal length, the power set should be all combinations. I have no idea what dispositions are, so if you can explain them, that would help.

这篇关于组合,配置与在PHP置换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆