Relative Content

Tag Archive for rustiteratorborrow-checkermutable

How can I implement an iterator on a changing data structure in Rust?

My goal is to find all minimal subspaces of boolean variables satisfying a condition. I already have a way to find all subspaces with the condition, and I need to extract only the minimal ones. The idea is to iterate over them ordered by increasing size and remove all greater ones at every iteration, which can be done efficiently, so it would hopefully exponentially reduce the number of iterations compared to if I didn’t delete them.