itertools icon indicating copy to clipboard operation
itertools copied to clipboard

Infinite Sequence of All Combinations

Open EthanTheMaster opened this issue 7 years ago • 1 comments

Adds feature requested by #293

Helper iterator adapter to make calculating all combinations easier.

EthanTheMaster avatar Oct 03 '18 22:10 EthanTheMaster

@tobz1000 Thanks for the feedback! Support for huge vectors and infinitely size iterators has been added. Rather than collecting the iterator on construction, I just store the iterator and clone it whenever I needed to retrieve data. By doing this, the size of the iterator becomes irrelevant and doing things like mappings for infinitely sized iterators just work. However, cloning the iterator every time there is a retrieval comes with a performance hit as you have to iterate through n elements to reach the nth item.

EthanTheMaster avatar Oct 08 '18 17:10 EthanTheMaster