Talk:Range consolidation: Difference between revisions
Content added Content deleted
m (→Python tester: sp.) |
|||
Line 24: | Line 24: | ||
==Python tester== |
==Python tester== |
||
I wrote a black-box, randomized tester for the Python example. All boundaries are generated as multiples of 0.5. |
I wrote a black-box, randomized tester for the Python example. All boundaries are generated as multiples of 0.5. |
||
Each boundary generates three testpoints <tt>x-.25, x, x+.25</tt>, i.e on a finer grid of 0.25. I then find the set of testpoints that are within the original ranges and this should equal the set of these same |
Each boundary generates three testpoints <tt>x-.25, x, x+.25</tt>, i.e on a finer grid of 0.25. I then find the set of testpoints that are within the original ranges and this should equal the set of these same initial testpoints that are within the consolidated ranges. I don't test that the consolidation is the smallest set of ranges that could be found, only that the number of consolidated ranges is no larger than the number of original ranges. |
||
Append the following below the Python entry text: |
|||
<lang python>#%% |
<lang python>#%% |
||
from random import randint |
from random import randint |