Talk:Range consolidation: Difference between revisions

m
Line 24:
==Python tester==
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 initialtestpointsinitial 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.
 
ApendAppend the following below the Python entry text:
<lang python>#%%
from random import randint
Anonymous user