Open [class]

The class splinekit.interval.Open is the concrete class that handles the bounded intervals that are left-open and right-open.

This concrete class honors Interval and Bounded; it handles open intervals between a pair of finite real numbers.


class splinekit.interval.open.Open(bounds: Tuple[float, float])

Bases: Interval, Bounded

The bounded interval \(\{x\in{\mathbb{R}}|x_{0}<x<x_{1}\}=(x_{0},x_{1}).\)


property infimum: float

Left endpoint.


property supremum: float

Right endpoint.


property isleftopen: bool

True


property isrightopen: bool

True


property isopen: bool

True


property ishalfopen: bool

False


property isclosed: bool

False


property isleftbounded: bool

True


property isrightbounded: bool

True


property ishalfbounded: bool

False


property isbounded: bool

True


property isdegenerate: bool

False


property isproper: bool

True


property interior: Self

Open((self.infimum, self.supremum))


property closure: Self

Closed((self.infimum, self.supremum))


property diameter: float

self.supremum - self.infimum


property midpoint: float

0.5 * (self.supremum + self.infimum)


sortorder() float

self.midpoint


__contains__(x: float) bool

self.leftbound < x < self.rightbound


static __new__(cls, bounds: Tuple[float, float]) Self

Creates the bounded open interval \(\{x\in{\mathbb{R}}|x_{0}<x<x_{1}\}=(x_{0},x_{1})\) that contains all numbers that are larger than \(x_{0}\) and smaller than \(x_{1}.\)

Parameters:

bounds – The tuple (infimum, supremum).

Returns:

An Open interval if bounds contains two finite numbers, with the first number being smaller than the second; otherwise, an interval from {RR, Empty, Above, Below}.

Return type:

Interval