In general, whenever you're representing a range of any kind, you have several choices for what kinds of values to choose for the beginning and ending of your range. For example, if you want to have a range containing the integers 1, 2, 3, 4, 5 you could choose these possible values:
- begin = 0, end = 5 (aka begin < x <= end)
- begin = 1, end = 5 (aka begin <= x <= end)
- begin = 0, end = 6 (aka begin < x < end)
- begin = 1, end = 6 (aka begin <= x < end (the C++ STL and many other libraries seem to choose this)).
I'm not sure what measures I should use to choose one of these options.