Detecting Overlap in Condition Ranges
A category rule should state whether its ranges overlap and which outcome to choose if several conditions apply.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Check the common interval
Suppose “small” is below 10 and “medium” spans 8 through 20. Values 8 and 9 qualify for both. Using an exclusive chain picks one according to order. If every quantity should have a unique category, use boundaries that define a partition.
Test thresholds together
For below 10, 10 through 20, and above 20, test 9, 10, 20, and 21. These values test both changes, including the potentially ambiguous endpoints. Inclusive and exclusive comparisons make each boundary explicit in the code.[1][2]
Sketch the actual intersections before choosing order
A grading policy can mark scores from 50 through 75 as review and scores above 70 as eligible for the next course. Scores 71 through 75 then satisfy both descriptions. That overlap could be meaningful if a learner can receive both labels. If only one status is allowed, decide which one wins or change the intervals so they form a partition. Write a row with score 73 and another with score 76. They distinguish those interpretations. See exclusive chains.
Check gaps as well as overlaps
Two adjacent half-open intervals can share a boundary without assigning any legal point twice under their convention. With an integer cutoff of seventy, the rules below seventy and at least seventy cover every integer. Using both below and above seventy would leave seventy unclassified. Set partitions express the general coverage rule.
Test the exact endpoints and a value belonging to each interior. If two independent labels are intended, verify the combination appears only once in the overall report. When output must be unique, justifying one branch as an explicit higher-priority exception can be clearer than relying on accidental order.