Expand description

Mathematical intervals.

Mathematical intervals represent sets of numbers (or other values, for example IP addresses) from between of bonds. Each bond can be closed or open meaning that the bond itself is or isn’t included in the set. An example of a closed interval is:

[1, 2]

That means - each number between 1 and 2 including 1 and 2. An example of an open bound is:

(3,7)

That means - each number between 3 and 7 but 3 and 7 are excluded from the set. A special case of an interval is an empty interval, usually noted as:

More: https://en.wikipedia.org/wiki/Interval_(mathematics

Inspiration

This implementation is highly inspired by three C++ boost libraries:

Structs

Mathematical interval.
Represents the lower bound of an interval.
Represents the upper bound of an interval.