OERange class is used to represent
numerical intervals that may be bounded or unbounded.
The default constructor initializes an empty (and invalid) range object.
OERange(low: float, high: float, inclusivity: str="")
Constructs a range between low and high, with the provided inclusivity.
The low value of the range. For an unbounded interval, -math.inf can be specified.
The high value of the range. For an unbounded interval, math.inf can be specified.
Represents the inclusivity of low and high in the range. Allowed values are
[low, high] or low <= x <= high
(low, high] or low < x <= high
[low, high) or low <= x < high
(low, high) or low < x < high
__eq__(rhs: OERange) -> bool
Returns True if the lower, upper, and inclusivity values are all equal between the two OERange values.
is_valid() -> bool
Returns True if either of the low or high values is bounded.
get_low() -> float
Returns the lower value of the range. This will return -math.inf if the range is unbounded at the low end.
get_high() -> float
Returns the upper value of the range. This will return math.inf if the range is unbounded at the high end.
get_inclusivity_string() -> str
Returns one of the four strings, “”, “(]”, “[)”, or “()” representing the inclusivity of the range.
is_unbounded_low() -> bool
Returns True if this OERange object has -infinity as a lower value.
is_unbounded_high() -> bool
Returns True if this OERange object has infinity as an upper value.