ASCIIMath rendering of the current state (terminal output, not chainable).
Read-only access to the normalized interval list.
Number of intervals, once merged.
LaTeX rendering of the current state (terminal output, not chainable).
Complement of this domain in ℝ. Each interval boundary flips its open/closed sense.
True when the number belongs to one of the intervals.
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 when the domain has no interval.
Replace the domain with a string, an interval or another domain. See fromString for the notation.
StaticemptyThe empty domain ∅.
StaticfromStaticfromStaticfromParse a French-notation domain string.
Supported forms:
O/ → ∅RR → ℝRR^** → ℝ* = ]-∞;0[ ∪ ]0;+∞[RR\{a;b;…} → ℝ minus a finite set of points{a} → closed singleton (delegated to Interval.fromString){a;b;…} → union of closed singletonsI1uuI2uu… → union of intervals (each parsed via Interval.fromString)StaticrealThe whole real line ℝ.
A (possibly empty) subset of ℝ represented as a finite union of intervals. The internal interval list is always sorted and non-overlapping (normalized).
Construct via
new Domain(),new Domain(string),new Domain(interval),new Domain(domain), or the static factoriesfromIntervals,fromInterval,empty,real,fromString.