itertools
itertools copied to clipboard
Infinite Sequence of All Combinations
Adds feature requested by #293
Helper iterator adapter to make calculating all combinations easier.
@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.