Interval Set #
IntervalSet operations like IntervalSet.canonicalize
or IntervalSet.intersection
def
IntervalSet.Acc.with_none
(acc : Interval.Acc)
(n : NonemptyInterval Char)
(h : acc.next.isNone = true)
:
Equations
- IntervalSet.Acc.with_none acc n h = { next := some n, set := acc.set, nonOverlapping := ⋯ }
Instances For
def
IntervalSet.Acc.with_next
(acc : Interval.Acc)
(n : NonemptyInterval Char)
(h1 : Interval.is_start_eq acc.next n)
:
Equations
- IntervalSet.Acc.with_next acc n h1 = { next := some n, set := acc.set, nonOverlapping := ⋯ }
Instances For
def
IntervalSet.Acc.with_next_set
(acc : Interval.Acc)
(l r : NonemptyInterval Char)
(h1 : Interval.nonOverlapping l r)
(h2 : acc.next = some l)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- IntervalSet.instInhabitedAcc = { default := { next := none, set := default, nonOverlapping := IntervalSet.instInhabitedAcc.proof_1 } }
Converts ranges
into IntervalSet
with canonical ordering.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Negate a interval set wrt the corresponding BoundedOrder instBoundedOrderCharInstLEChar
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Intersection of interval sets
Equations
- interval1.intersection interval2 = IntervalSet.canonicalize (IntervalSet.intersection.loop 0 0 interval1.intervals interval2.intervals #[])
Instances For
@[irreducible]
Equations
- One or more equations did not get rendered due to their size.
Instances For
Subtract the interval set interval2
from interval1
.
Equations
- interval1.difference interval2 = interval1.intersection interval2.negate
Instances For
Union of interval sets.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Compute the symmetric difference (A⊖B = (A∪B)(A∩B)) of the two sets.
Equations
- interval1.symmetric_difference interval2 = (interval1.union interval2).difference (interval1.intersection interval2)