You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On using the library I understand better why the code is structured as it is -- given that you are going to returning the vector objects in the combinations, there is little harm in having the user create them up front. I can also use the Range factory method.
I ended up really liking this way of doing things. By changing the items I sent in my original vector I got very useful control over exactly what was iterated which eliminated costly post hoc filtering.
It still might be useful to not require a vector in which case you would return a combination just made of indices into a specified range.
From PeterVermont on December 19, 2012 23:40:45
I would like the equivalent of the Python itertools.combinations(iterable, r)
See: http://docs.python.org/2/library/itertools.html#itertools.combinations I wish to make a SimpleCombination of Integers over a range. As best as I can tell, all of your code requires generating a vector the size of the entire range which could be hundreds of thousands.
Thanks!
Original issue: http://code.google.com/p/combinatoricslib/issues/detail?id=5
The text was updated successfully, but these errors were encountered: