| Home | Libraries | People | FAQ | More

### Additional Interval Orderings

In addition to the standard orderings `operator <` and rleated `> <= >=` that you will find in the librarie's function synopsis, intervals implement some additional orderings that can be useful.

T | discrete _interval | continuous _interval | right_open _interval | left_open _interval | closed _interval | open _interval
--- | --- | --- | --- | --- | --- | ---
Interval bounds | dynamic | dynamic | static | static | static | static
Form |  |  | asymmetric | asymmetric | symmetric | symmetric
Orderings |  |  |  |  |  |
`bool exclusive_less(const T&, const T&)` | 1 | 1 | 1 | 1 | 1 | 1

    bool lower_less(const T&, const T&)
    bool lower_equal(const T&, const T&)
    bool lower_less_equal(const T&, const T&)

1

1

1

1

1

1

    bool upper_less(const T&, const T&)
    bool upper_equal(const T&, const T&)
    bool upper_less_equal(const T&, const T&)

1

1

1

1

1

1

A central role for the icl plays the `exclusive_less` ordering, which is used in all interval containers. The other orderings can be useful to simplify comparison of intervals specifically for dynamically bounded ones.

Orderings | Description
--- | ---
`bool exclusive_less(const T&, const T&)` | `exclusive_less(x1, x2)` is true if every element of interval `x1` is less than every element of interval `x2` w.r.t. the the intervals `Compare` ordering

    bool lower_less(const T&, const T&)
    bool lower_equal(const T&, const T&)
    bool lower_less_equal(const T&, const T&)

Compares the beginnings of intervals.

    lower_less(x,y)  == true; // x begins before y
    lower_equal(x,y) == true; // x and y begin at the same element
    lower_less_equal(x,y) == lower_less(x,y) || lower_equal(x,y);

    bool upper_less(const T&, const T&)
    bool upper_equal(const T&, const T&)
    bool upper_less_equal(const T&, const T&)

Compares the endings of intervals.

    upper_less(x,y)  == true; // x ends before y
    upper_equal(x,y) == true; // x and y end at the same element
    upper_less_equal(x,y) == upper_less(x,y) || upper_equal(x,y);

See also . . .

Equivalences and Orderings

Back to section . . .

Additional interval functions
Function Synopsis
Interface