Subsets_of_k broken?
Posted: 13 Jan 2012, 14:37
Heyho!
After updating to 2.11 I discovered that some of my functions suddenly started producing segfaults. The reason for this seems to be that pm::Subsets_of_k (in PowerSet.h) does not behave as it used to behave. In fact, it seems to be broken: I created a small test function containing the following piece of code:
Now if I call this function several times, I get a different output each time. The array contains part of the correct answer (which should be all subsets of cardinality 2 of the set {0,..,4}, but it also contains sets of the form {0 0} or {0 random large number}.
This is probably a bug
- except if the interface itself has changed, which would be very bad for backwards compatibility...
After updating to 2.11 I discovered that some of my functions suddenly started producing segfaults. The reason for this seems to be that pm::Subsets_of_k (in PowerSet.h) does not behave as it used to behave. In fact, it seems to be broken: I created a small test function containing the following piece of code:
Code: Select all
Set<int> s = sequence(0,5);
Array<Set<int> > ps (pm::Subsets_of_k<Set<int> >(s,2));
pm::cout << ps << endl;
This is probably a bug