partialrange
Partialrange is a concept used to describe a contiguous subset of a totally ordered set where one or both endpoints may be unspecified. It generalizes the idea of an interval by allowing incomplete information about its boundaries while preserving the notion of a consecutive block of elements or values. A partialrange has a lower bound, an upper bound, and flags indicating whether the endpoints are inclusive or exclusive. If a bound is not specified, that side of the range is unbounded.
Formally, let S be a totally ordered set with order <=. A partialrange is defined by a triple
Examples include [5, ∞) (lower bound 5, upper bound undefined), (−∞, 10] (upper bound 10, lower bound undefined),
Applications of partialrange include modeling range filters in databases, time windows in streaming systems, and index-based