PiMath API
    Preparing search index...

    Class Interval

    An immutable interval over ℝ with exact (Solution-based) bounds.

    null encodes ±∞ (always open by convention). Prefer the static factories — fromBounds, empty, real, point, fromString — or new Interval(stringOrInterval) via the public constructor.

    Implements

    Index
    • get leftOpen(): boolean

      True when the left bound is excluded. An infinite bound is always open.

      Returns boolean

    • get rightOpen(): boolean

      True when the right bound is excluded. An infinite bound is always open.

      Returns boolean

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

      Parameters

      Returns boolean

    • 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

    • True for the empty set, and for bounds that enclose nothing (]2;2[, [3;1]).

      Returns boolean

    • Construct an interval from explicit bounds and open/closed flags. A null bound encodes ±∞ and is always forced open, regardless of the flag passed.

      Parameters

      • left: Solution | null
      • right: Solution | null
      • leftOpen: boolean
      • rightOpen: boolean

      Returns Interval

    • Parse a French-notation interval string.

      Supported forms:

      • O/ → empty set
      • RR → ]-∞; +∞[
      • 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.

      Parameters

      • value: string

      Returns Interval

      on unrecognised format.