ASCIIMath rendering of the current state (terminal output, not chainable).
True when the left bound is excluded. An infinite bound is always open.
True when the right bound is excluded. An infinite bound is always open.
LaTeX rendering of the current state (terminal output, not chainable).
True when the number is in the interval. The bounds are compared by their decimal value, and an empty
interval or a NaN contains nothing.
Copy the mathematical state of another instance into this (display
state is NOT transferred — the receiver keeps its own formatting). Entry
point used when constructing/parsing from a same-type input. Distinct from
clone. Classes without a real implementation throw
NotImplementedError.
True for the empty set, and for bounds that enclose nothing (]2;2[, [3;1]).
True iff the interval is a closed singleton [x; x].
True iff the interval is the whole real line ]-∞; +∞[.
Replace the interval with a string or another interval. See fromString for the notation.
StaticemptyThe empty set ∅.
StaticfromStaticfromParse a French-notation interval string.
Supported forms:
O/ → empty setRR → ]-∞; +∞[RR_+, RR_- → [0; +∞[ or ]-∞; 0]RR_+**, RR_-** → ]0; +∞[ or ]-∞; 0[{a} → singleton {a}]a;b[, [a;b], [a;b[, ]a;b] → general (a, b parsed via Solution.fromString or ±oo)RR^** (= ℝ*) is NOT a single interval — use Domain.fromString instead.
StaticpointStaticrealThe whole real line ]-∞; +∞[.
An immutable interval over ℝ with exact (Solution-based) bounds.
nullencodes ±∞ (always open by convention). Prefer the static factories —fromBounds,empty,real,point,fromString— ornew Interval(stringOrInterval)via the public constructor.