takemaru / graphillion

Fast, lightweight graphset operation library
Other
466 stars 40 forks source link

Fix the bug of #45 #48

Closed junkawahara closed 4 years ago

junkawahara commented 4 years ago

This pull request fixes the issue in #45: "GraphSet([[]]).min_iter() should return the set consisting of the empty graph but not so."

The cause of the bug is that next() is wrongly called twice in the constructors of setset::random_iterator and setset::weighted_iterator (called in both each constructor and its parent constructor).

This fix suppresses the call of next() in the parent constructors.