h$3/      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None+ #$%&'(-./235678;<=>?^interval-patterns&Either one of something, or two of it.Use  to deconstruct.interval-patternsApply a ! argument function appropriately.(c) Melanie Brown 2022: BSD3 (see the file LICENSE)None+ #$%&'(-./235678;<=>?s; interval-patternsAccording to  8https://en.wikipedia.org/wiki/Allen%27s_interval_algebraAllen, two intervals can be "adjacent" in 13 different ways, into at most 3 distinct intervals. In this package, this quality is called the   of the intervals."interval-patternsA type class for inverting &s.%interval-patternsc.f. :.&interval-patternsA & is an endpoint of an .+interval-patterns+The kinds of extremum an interval can have.0interval-patternsThe whole interval.1interval-patterns3A pattern synonym matching finite closed intervals.2interval-patterns8A pattern synonym matching finite closed-open intervals.3interval-patterns8A pattern synonym matching finite open-closed intervals.4interval-patterns1A pattern synonym matching finite open intervals.6interval-patterns,A pattern synonym matching closed intervals.7interval-patterns1A pattern synonym matching closed-open intervals.8interval-patterns1A pattern synonym matching open-closed intervals.9interval-patterns*A pattern synonym matching open intervals.:interval-patternsThe : of an extremum is how it would be viewed from the other "direction" of how it is currently.c.f. %.;interval-patternsExtract the term from a &.<interval-patterns&5s have special comparison rules for identical points.minima are lesser than infimasuprema are lesser than maxima9infima and minima are both lesser than suprema and maxima?interval-patterns Since the % constraints on the constructors for  prevent it from being a , this will have to suffice.@interval-patternsSame as ? but on the  of the underlying type.Ainterval-patterns Since the % constraints on the constructors for  prevent it from being , this will have to suffice.Binterval-patternsSame as A but on the  of the underlying type.Cinterval-patternsGet the (lower, upper) C of an .c.f. D, E.Dinterval-patterns#Get the lower bound of an interval. lower = fst . boundsEinterval-patterns#Get the upper bound of an interval. upper = snd . boundsFinterval-patternsGet the lower bound of an interval (with the bound expressed at the term level).Ginterval-patternsGet the upper bound of an interval (with the bound expressed at the term level).Hinterval-patternsGiven  s, try to make an interval.Iinterval-patternsGiven limits and +s, try to make an interval.Jinterval-patternsThe result of having compared the same two intervals in reverse order.Kinterval-patterns%Get the convex hull of two intervals.hull (7 :|>: 8) (3 :|>: 4)(Levitate 3 :|->: Levitate 8) hull (Bottom :<-|: 3) (3 :<|: 4)(Bottom :<-|: Levitate 4)Linterval-patterns5Get the convex hull of a non-empty list of intervals.Minterval-patterns2Test whether a point is contained in the interval.Ninterval-patterns3Create the closed-closed interval at a given point.Ointerval-patterns7Get the infimum of an interval, weakening if necessary.Pinterval-patterns-Get the minimum of an interval, if it exists.Qinterval-patterns,Get the maximum of an interval if it exists.Rinterval-patterns8Get the supremum of an interval, weakening if necessary.Sinterval-patterns'Open both bounds of the given interval.Tinterval-patterns(Close both bounds of the given interval.Uinterval-patterns?Make the interval open-closed, leaving the endpoints unchanged.Vinterval-patterns?Make the interval closed-open, leaving the endpoints unchanged.Winterval-patterns;Make the lower bound open, leaving the endpoints unchanged.Xinterval-patterns=Make the lower bound closed, leaving the endpoints unchanged.Yinterval-patterns;Make the upper bound open, leaving the endpoints unchanged.Zinterval-patterns=Make the upper bound closed, leaving the endpoints unchanged.]interval-patternsCalculate the  & between two intervals, according to  8https://en.wikipedia.org/wiki/Allen%27s_interval_algebraAllen.^interval-patterns:Calculate the intersection of two intervals, if it exists.  >>> intersect (2 :<>: 4) (3 :||: 5) Just (Levitate 3 :|->: Levitate 4) >>> intersect (2 :<>: 4) (4 :||: 5) Nothing >>> intersect (1 :<>: 4) (2 :||: 3) Just (Levitate 2 :|-|: Levitate 3) _interval-patterns*Get the union of two intervals, as either .  >>> union (2 :||: 5) (5 :<>: 7) One (Levitate 2 :|->: Levitate 7) >>> union (2 :||: 4) (5 :<>: 7) Two (Levitate 2 :|-|: Levitate 4) (Levitate 5 : -: Levitate 7) `interval-patterns O(n log n)'. Get the union of a list of intervals.This function uses  . See also a.ainterval-patternsO(n).. Get the union of a sorted list of intervals.8NOTE: The input condition is not checked. Use with care.binterval-patterns1Take the complement of the interval, as possibly .  >>> complement (3 :<>: 4) Just (Two (Bottom :|-|: Levitate 3) (Levitate 4 :|-|: Top)) Note that infinitely-open intervals will return the points at infinity toward which they are infinite in their result:  >>> complement (Levitate 3 : -=: Top) Just (Two (Bottom :|-|: Levitate 3) (Top :|-|: Top)) cinterval-patterns8Remove all points of the second interval from the first.  >>> difference Whole (3 :<>: 4) Just (Two (Bottom :|-|: Levitate 3) (Levitate 4 :|-|: Top)) >>> difference (1 :<>: 4) (2 :||: 3) Just (Two (Levitate 1 : -: Levitate 2) (Levitate 3 : -: Levitate 4)) dinterval-patternsInfix synonym for ceinterval-patterns>The difference of the union and intersection of two intervals.  >>> symmetricDifference Whole (3 :<>: 4) Just (Two (Bottom :|-|: Levitate 3) (Levitate 4 :|-|: Top)) >>> symmetricDifference (1 :<>: 4) (2 :||: 3) Just (Two (Levitate 1 : -: Levitate 2) (Levitate 3 : -: Levitate 4)) finterval-patternsGet the measure of an interval. 6 >>> measure (-1 :<>: 1) Just 2 >>> measure (Bottom : -: Levitate 1) Nothing ginterval-patternsApply a function to the lower, then upper, endpoint of an interval.  >>> measuring max (-1 :<>: 1) Just 1 >>> measuring min (-1 :<>: 1) Just (-1) hinterval-patterns?Get the distance between two intervals, or 0 if they adjacency.  >>> hausdorff (3 :<>: 5) (6 :<>: 7) Just 1 >>> hausdorff (3 :<>: 5) Whole Just 0 iinterval-patternsm i r( creates the closed interval centred at m with radius r.$For the open interval, simply write S (x i y).jinterval-patternsFull containment.  !"#$%&*'()+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij+,-./:&*'();"#$%< !>=?@AB9876543210iICDFEGHPORQKLMNSTUVWXYZ[\ J]^_`abcdefghj 55551525354565758595None+ #$%&'(-./235678;<=>?)0interval-patternsThe  sets on a type are the sets generated by its open intervals. It forms a  algebra with  as join and  as meet, and a  with  as addition and  as multiplication (and  as negation). In fact the algebra is Boolean as the operation x  y =  x  y.It is a monoid that is convenient for agglomerating groups of intervals, such as for calculating the overall timespan of a group of events. However, it is agnostic of how many times each given point has been covered. To keep track of this data, use .interval-patterns Consider the  set identified by a list of s.interval-patternsTurn a  set into a  of s.interval-patterns The empty  set.interval-patternsThe  set consisting of a single .interval-patternsIs this  set empty?interval-patterns Insert an  into a " set, agglomerating along the way.interval-patterns The maximal # set, that covers the entire range.interval-patternsCompletely remove an  from a  set.interval-patternsIs this point M any connected component of the  set?interval-patternsIs this point not M any connected component of the  set?interval-patternsA synonym for .interval-patternsA synonym for .interval-patterns6Remove all intervals of the second set from the first.interval-patterns%Take the symmetric difference of two  sets.interval-patterns Take the 3 set consisting of each point not in the given one.interval-patterns Given an  i,  i will trim a  set so that its  is contained in i.interval-patternsTake the intersection of two  sets.interval-patterns#Take the intersection of a list of  sets.interval-patternsTake the smallest spanning  of a - set, provided that it is not the empty set.None+ #$%&'(-./235678;<=>?.5 interval-patternsA blank canvas.interval-patternssingleton ix y is the rectangle with base ix of thickness y.interval-patterns Draw the $ of specified bases and thicknesses.interval-patterns,Get all of the bases and thicknesses in the .interval-patterns Ignore the & and focus only on whether points are within any contained  or not.interval-patterns insert ix y l draws over l a rectangle with base ix of thickness y.interval-patterns1Take away a thickness over a given base from the .interval-patterns'Add the given thickness to every point.interval-patternsExcavate$ the second argument from the first.interval-patternsRestrict the range of the  to the given .interval-patternsGet the thickness of the  at a point.interval-patterns$Where and how thick is the thickest ?interval-patterns Convert the  into a list of beginning-points and heights, that define a step function piecewise.None+ #$%&'(-./235678;<=>?/interval-patterns !type Timeframe = Interval UTCTime  !"%#$#&)(*'+/.,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij      !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~efikhQpi0interval-patterns-0.3.0.0-3bEU6kv98qpFpXa0iTxpnm Data.OneOrTwo Data.IntervalData.Interval.BorelData.Interval.LayersData.TimeframeLayersOneOrTwoOneTwooneOrTwo $fEqOneOrTwo $fOrdOneOrTwo$fShowOneOrTwo$fReadOneOrTwo$fGenericOneOrTwo$fDataOneOrTwo$fFunctorOneOrTwo$fFoldableOneOrTwo$fTraversableOneOrTwo AdjacencyBeforeMeetsOverlapsStartsDuringFinishes Identical FinishedByContains StartedBy OverlappedByMetByAfterInterval:<-->::<--|::|-->::|--|: SomeBoundBoundingOppositebound opposeBoundBoundMinInfSupMaxExtremumMinimumInfimumSupremumMaximumWhole:||::|>::<|::<>::---::|-|::|->::<-|::<->:oppositeunBound compareBoundsoppose unSomeBoundimapimapLev itraverse itraverseLevboundslowerupper lowerBound upperBoundinterval...converseAdjacencyhullhullswithinpointiinfiminimaxisupopenclose openclosed closedopen openLower closedLower openUpper closedUppersetLowersetUpper adjacency intersectunionunions unionsAsc complement difference\\symmetricDifferencemeasure measuring hausdorff+/- isSubsetOf $fOrdBound $fEqBound$fTraversableBound$fFoldableBound$fFunctorBound$fBoundingMaximum$fBoundingSupremum$fBoundingInfimum$fBoundingMinimum$fOrdSomeBound $fEqSomeBound $fOrdInterval$fShowInterval $fEqAdjacency$fOrdAdjacency$fShowAdjacency$fGenericAdjacency $fEqExtremum $fOrdExtremum$fEnumExtremum$fBoundedExtremum$fShowExtremum$fReadExtremum$fGenericExtremum$fDataExtremum $fEqIntervalBorelborel intervalSetempty singletonnullinsertwholecutoutmember notMemberclip intersection intersections $fRingBorel$fSemiringBorel$fHeytingBorel$fBoundedJoinSemiLatticeBorel$fBoundedMeetSemiLatticeBorel$fLatticeBorel $fMonoidBorel$fSemigroupBorel $fOneBorel $fEqBorel $fOrdBorel $fShowBorel$fGenericBorelfromListtoListsquashremovebaseline thicknessthickesttoStepFunctionnestings nestingsAsc $fGroupLayers$fMonoidLayers$fSemigroupLayers $fEqLayers $fOrdLayers $fShowLayers$fFunctorLayers$fGenericLayers TimeframelocalTimeframeAtlocalTimeframepureLocalTimeframedurationghc-prim GHC.ClassesOrdbaseGHC.BaseFunctor$lattices-2.0.3-5ASpuz9oEnCYID7TaUwIpAlgebra.Lattice.Levitated LevitatedData.Traversable Traversable Data.OldListsortAlgebra.HeytingHeyting$semirings-0.6-L6a1C3p7N9dB4CY2Q5m88B Data.SemiringRing==>Algebra.Lattice\/containers-0.6.2.1Data.Set.InternalSet<> Data.Foldablefold