ClosedOpen [class]
The class splinekit.interval.ClosedOpen is the concrete class that handles the bounded intervals that are left-closed and right-open.
This concrete class honors Interval and Bounded; it handles
closed-open intervals between a pair of finite real numbers.
- class splinekit.interval.closed_open.ClosedOpen(bounds: Tuple[float, float])
-
The bounded interval \(\{x\in{\mathbb{R}}|x_{0}\leq x<x_{1}\}=[x_{0},x_{1}).\)
- property infimum: float
Left endpoint.
- property supremum: float
Right endpoint.
- property isleftopen: bool
False
- property isrightopen: bool
True
- property isopen: bool
False
- property ishalfopen: bool
True
- 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 closed-open interval \(\{x\in{\mathbb{R}}|x_{0}\leq x<x_{1}\}=[x_{0},x_{1})\) that contains all numbers that are not smaller than \(x_{0}\) and smaller than \(x_{1}.\)
- Parameters:
bounds – The tuple (infimum, supremum).
- Returns:
A
ClosedOpeninterval ifboundscontains two finite numbers, with the first number being smaller than the second; otherwise, an interval from {RR,Empty,NotBelow,Below}.- Return type: