Closed janeclange closed 4 years ago
I've made the small changes that you suggested, including an inline comment explaining (len(s) + gran - 1 // gran) and a slight modification to the docstring. Is there anything else that should go into the docstring?
Clark said that if I'm going to submit a whole bunch of changes, I should do it in several small parts...so here's the first part of the portfolio update.
This is all the changes that are actually part of ddsmt.py (the rest is in separate files). It changes _substitute to use a queue instead of lists, to preserve order and reduce some overhead. It also adds a minimum granularity proportional to the square root of the superset size, to cut down on the number of small tests in very large supersets.