Talk:Range consolidation: Difference between revisions
Content added Content deleted
m (→Python tester: sp.) |
(→Python tester: handle case where algorithm could generate new, wrong, ranges.) |
||
Line 49: | Line 49: | ||
for tp in (bound - gen_grid / 2, bound, bound + gen_grid / 2): |
for tp in (bound - gen_grid / 2, bound, bound + gen_grid / 2): |
||
testpoint.add(tp) |
testpoint.add(tp) |
||
return |
return testpoint |
||
def in_a_range(testpoints, ranges): |
def in_a_range(testpoints, ranges): |
||
Line 69: | Line 69: | ||
consolidated = consolidate(ranges) |
consolidated = consolidate(ranges) |
||
tp = gen_test_points(ranges) |
tp = gen_test_points(ranges) |
||
tp |= gen_test_points(consolidated) # tp around all boundaries |
|||
good = (len(consolidated) <= len(ranges) |
good = (len(consolidated) <= len(ranges) |
||
and in_a_range(tp, ranges) == in_a_range(tp, consolidated)) |
and in_a_range(tp, ranges) == in_a_range(tp, consolidated)) |