| 1 | <?php |
||
| 10 | class Permutator |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @return \Generator & iterable<array> |
||
| 14 | */ |
||
| 15 | 142 | public static function getPermutations(array $set): \Generator |
|
| 23 | |||
| 24 | /** |
||
| 25 | * @return array[] |
||
| 26 | */ |
||
| 27 | 142 | private static function getPowerSet(array $set): array |
|
| 47 | |||
| 48 | /** |
||
| 49 | * @return \Generator & iterable<array> |
||
| 50 | */ |
||
| 51 | 142 | private static function generateFixedLengthPermutations(array $items, array $perms = []): \Generator |
|
| 65 | } |
||
| 66 |