drupol/phpermutations

Question on usage

Closed this issue · 1 comments

Would i be able to utilize this library to determine all the combinations of x items into y groups?
For example, if I had 2 items [1, 2] with 2 groups, the 4 possibilities would be:

  1. [ 1,2 ] [ ]
  2. [ 1 ] [ 2 ]
  3. [ 2 ] [ 1 ]
  4. [ ] [ 1,2 ]

Thanks in advance!

Hi,
I just noticed this issue, sorry for that.
Unfortunately, this is not the purpose of the library, so I would say no.
I guess it wouldn't be hard to implement a custom solution using this library to do that.
Feel free to re-open if needed.