ramhiser/itertools2

Port combinations() from Python

Closed this issue · 1 comments

Port combinations() from Python

The Python implementation of itertools.combinations relies on itertools.permutations, which allows permutations to be limited to length r. Currently, itertools2::ipermutations generates full-length permutations. I added an argument in the commit above to limit the permutations, but it is not fully implemented yet. Afterwards, itertools2::icombinations should be good to go.