PiMath API
    Preparing search index...

    Class Domain

    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 factories fromIntervals, fromInterval, empty, real, fromString.

    Implements

    Index
    • 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.

      Parameters

      Returns this

    • O(n·m) pairwise intersection — negligible for the typical 1–3 interval count. The result is normalized (sorted, non-overlapping).

      Parameters

      Returns Domain

    • Parse 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 singletons
      • I1uuI2uu… → union of intervals (each parsed via Interval.fromString)
      • Any single-interval string → delegated to Interval.fromString

      Parameters

      • value: string

      Returns Domain

      on unrecognised format.