úÎu)dyÒ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑ>ÒÓÔÕJA specialized type intended to organize the return of extract-min queries K from a binomial forest. We walk all the way through the forest, and then  walk backwards.  Extract rk a' is the result type of an extract-min 4 operation that has walked as far backwards of rank rk -- that is, it  has visited every root of rank >= rk. The interpretation of %Extract minKey minVal children forest is  minKey= is the key of the minimum root visited so far. It may have  any rank >= rk-. We will denote the root corresponding to  minKey as minRoot.  minVal is the value corresponding to minKey.  children is those children of minRoot which have not yet been @ merged with the rest of the forest. Specifically, these are  the children with rank < rk.  forest: is an accumulating parameter that maintains the partial 1 reconstruction of the binomial forest without minRoot . It is ( the union of all old roots with rank >= rk (except minRoot), # with the set of all children of minRoot with rank >= rk.  Note that forest+ is lazy, so if we discover a smaller key  than minKey later, we haven't wasted significant work. ÖרÙÚÛÜÝÞßàáâ&A priority queue where values of type a! are annotated with keys of type k. = The queue supports extracting the element with minimum key. ãäåæçèéO(1)%. Returns the empty priority queue. O(1)+. Checks if this priority queue is empty. O(1),. Returns the size of this priority queue. O(1)*. Constructs a singleton priority queue.  Amortized O(1) , worst-case O(log n) . Inserts 3 an element with the specified key into the queue. ê>Internal helper method, using a specific comparator function.  Amortized O(log(min(n1, n2))) , worst-case O(log(max(n1, n2))). Returns the union  of the two specified queues. ëRTakes the union of the two specified queues, using the given comparison function. O(1)F. The minimal (key, element) in the queue, if the queue is nonempty. O(1)M. Alter the value at the minimum key. If the queue is empty, does nothing. O(log n) . (Actually O(1) if there'6s no deletion.) Update the value at the minimum key. & If the queue is empty, does nothing. O(log n)T. Retrieves the minimal (key, value) pair of the map, and the map stripped of that  element, or ì if passed an empty map. O(n)0. Map a function over all values in the queue. O(n).   f q == mapKeys f q, but only works when f is strictly  monotonic.  The precondition is not checked., This function has better performance than  mapKeys. O(n). Map values and collect the í results. O(n). Map values and separate the î and ï results.  O(n log n)3. Fold the keys and values in the map, such that   f z q ==  List.foldr (ð f) z ( toAscList q). =If you do not care about the traversal order, consider using .  O(n log n)3. Fold the keys and values in the map, such that   f z q ==  List.foldl (ð . f) z ( toAscList q). =If you do not care about the traversal order, consider using . ñEquivalent to ', save the assumption that this key is <=  every other key in the map.  The precondition is not checked. òO(1)8. Returns a binomial tree of rank zero containing this  key and value. óO(1);. Takes the union of two binomial trees of the same rank. ôcTakes the union of two binomial forests, starting at the same rank. Analogous to binary addition. õ_Takes the union of two binomial forests, starting at the same rank, with an additional tree. = Analogous to binary addition when a digit has been carried. öUInserts a binomial tree into a binomial forest. Analogous to binary incrementation. ÷TInserts a binomial tree into a binomial forest. Assumes that the root of this tree S is less than all other roots. Analogous to binary incrementation. Equivalent to  ö (  _ _ -> True). øùúBWalks backward from the biggest key in the forest, as far as rank rk. 7 Returns its progress. Each successive application of  extractBin takes  amortized O(1)/ time, so applying it from the beginning takes O(log n) time. û,Utility function for mapping over a forest. üUtility function for mapping a ý function over a forest. þ Utility function for mapping an ÿ function over a forest. O(n)S. An unordered right fold over the elements of the queue, in no particular order. O(n)R. An unordered left fold over the elements of the queue, in no particular order. +Unordered right fold on a binomial forest. *Unordered left fold on a binomial forest. >Maps a monotonic function over the keys in a binomial forest. O(log n). Analogous to deepseq in the deepseq: package, but only forces the spine of the binomial heap. #רÙÚÛÜÝÞßàáâãä ñ#רÙÙÚÛÛÜÝÝÞßâáààáâäããä ñ=JA specialized type intended to organize the return of extract-min queries K from a binomial forest. We walk all the way through the forest, and then  walk backwards.  Extract rk a' is the result type of an extract-min 4 operation that has walked as far backwards of rank rk -- that is, it  has visited every root of rank >= rk. The interpretation of Extract minKey children forest is  minKey= is the key of the minimum root visited so far. It may have  any rank >= rk-. We will denote the root corresponding to  minKey as minRoot.  children is those children of minRoot which have not yet been @ merged with the rest of the forest. Specifically, these are  the children with rank < rk.  forest: is an accumulating parameter that maintains the partial 1 reconstruction of the binomial forest without minRoot . It is ( the union of all old roots with rank >= rk (except minRoot), # with the set of all children of minRoot with rank >= rk.  Note that forest+ is lazy, so if we discover a smaller key  than minKey later, we haven't wasted significant work.  &Type alias for a comparison function.  %Type corresponding to the Zero rank.   If |rk| corresponds to rank k, then |   rk| corresponds to rank k+1.  \A priority queue implementation. Implemented as a find-min wrapper around a binomial heap. IIf you wish to perform folds on a priority queue that respect order, use   or  !. For any operation op in  or , queue1 op queue2 is equivalent to  toAscList queue1 op toAscList queue2. O(1). The empty priority queue. O(1)%. Is this the empty priority queue? O(1)(. The number of elements in the queue. O(1)5. Construct a priority queue with a single element.  Amortized O(1) , worst-case O(log n)0. Insert an element into the priority queue.  Amortized O(log (min(n,m))) , worst-case O(log (max (n,m)))*. Take the union of two priority queues. O(n) . Map elements and collect the í results. O(n)!. Map elements and separate the î and ï results. O(n)y. Assumes that the function it is given is monotonic, and applies this function to every element of the priority queue,  as in *. If it is not, the result is undefined.  O(n log n)Q. Performs a right-fold on the elements of a priority queue in ascending order. Equivalent to foldr f z (unfoldr suc s0). ! O(n log n)P. Performs a left-fold on the elements of a priority queue in ascending order. foldlUnfold f z suc s0 is equivalent to foldl f z (unfoldr suc s0).  !"cTakes a size and a binomial forest and produces a priority queue with a distinguished global root. #$%BWalks backward from the biggest key in the forest, as far as rank rk. 7 Returns its progress. Each successive application of  extractBin takes  amortized O(1)/ time, so applying it from the beginning takes O(log n) time. &'(&Constructs a binomial tree of rank 0. )* insertMin t f assumes that the root of t compares as less than  every other root in f, and merges accordingly. +,Given two binomial forests starting at rank rk, takes their union. 4 Each successive application of this function costs O(1), so applying it  from the beginning costs O(log n). ,PMerges two binomial forests with another tree. If we are thinking of the trees Q in the binomial forest as binary digits, this corresponds to a carry operation. " Each call to this function takes O(1) time, so in total, it costs O(log n). -CMerges a binomial tree into a binomial forest. If we are thinking H of the trees in the binomial forest as binary digits, this corresponds / to adding a power of 2. This costs amortized O(1) time. .BThe carrying operation: takes two binomial heaps of the same rank k  and returns one of rank k+1 . Takes O(1) time. "O(n)-. Unordered right fold on a priority queue. #$(Forces the spine of the priority queue. /%=Constructs a priority queue out of the keys of the specified . 0!      !)"#$%!        !)"#$%portable experimentallibraries@haskell.org&'()=Takes the union of a list of priority queues. Equivalent to 1  . * O(k log n)1. Index (subscript) operator, starting from 0.  queue !! k returns the (k+1) th smallest & element in the queue. Equivalent to toAscList queue !! k. ++, applied to a predicate p and a queue queue, returns the $ longest prefix (possibly empty) of queue of elements that satisfy p. 2=Equivalent to Data.List.takeWhile, but is a better producer. ,, p queue# returns the queue remaining after + p queue. --, applied to a predicate p and a queue queue, returns a tuple where 5 first element is longest prefix (possibly empty) of queue of elements that  satisfy p3 and second element is the remainder of the queue. .., applied to a predicate p and a queue queue, returns a tuple where 5 first element is longest prefix (possibly empty) of queue of elements that  do not satisfy p3 and second element is the remainder of the queue. / O(k log n). / k, applied to a queue queue!, returns a list of the smallest k elements of queue,  or all elements of queue itself if k >=  queue. 0 O(k log n). 0 k, applied to a queue queue , returns queue with the smallest k elements deleted,  or an empty queue if  k >= size queue. 1 O(k log n). Equivalent to (/ k queue, 0 k queue). 2O(n)6. Returns the queue with all elements not satisfying p removed. 3O(n)I. Returns a pair where the first queue contains all elements satisfying p, and the second queue & contains all elements not satisfying p. 4O(n)U. Creates a new priority queue containing the images of the elements of this queue.  Equivalent to : .  Data.List.map f . toList. 5 O(n log n)C. Extracts the elements of the priority queue in ascending order. 6 O(n log n)D. Extracts the elements of the priority queue in descending order. 7O(n)Q. Returns the elements of the priority queue in ascending order. Equivalent to 5. ;If the order of the elements is irrelevant, consider using >. 8 O(n log n)R. Performs a right-fold on the elements of a priority queue in descending order.  (foldrDesc f z q == foldlAsc (flip f) z q. 9 O(n log n)Q. Performs a left-fold on the elements of a priority queue in descending order.  (foldlDesc f z q == foldrAsc (flip f) z q. :O(n)7. Constructs a priority queue from an unordered list. ;O(n)8. Constructs a priority queue from an ascending list. Warning#: Does not check the precondition. <O(n)9. Constructs a priority queue from an descending list. Warning#: Does not check the precondition. =>?, !"#$%&'()*+,-./0123456789:;<=>?,&'()*/01+,-.234 !89756:;<"#?=>%$&'()*+,-./0123456789:;<=>?portable experimentallibraries@haskell.org03456@ The union of a list of queues: (@ == 7  ). AO(1)3. The minimal (key, element) in the queue. Calls 8 if empty. BO(log n)L. Deletes the minimal (key, element) in the queue. Returns an empty queue  if the queue is empty. CO(log n)<. Delete and find the element with the minimum key. Calls 8 if empty. DO(1)M. Alter the value at the minimum key. If the queue is empty, does nothing. EO(log n) . (Actually O(1) if there'6s no deletion.) Update the value at the minimum key. & If the queue is empty, does nothing. FO(log n)S. Retrieves the value associated with the minimal key of the queue, and the queue  stripped of that element, or ì if passed an empty queue. GO(n)0. Map a function over all values in the queue. HO(n). H f q# is the queue obtained by applying f to each key of q. I O(n log n)B. Traverses the elements of the queue in ascending order by key.  (I f q == \  $ 9 (ð f) (` q)) If you do not care about the order" of the traversal, consider using k. JO(n). Map values and collect the í results. KO(n). Map values and separate the î and ï results. LO(n)1. Filter all values that satisfy the predicate. MO(n)1. Filter all values that satisfy the predicate. NO(n)X. Partition the queue according to a predicate. The first queue contains all elements O which satisfy the predicate, the second all elements that fail the predicate. OO(n)X. Partition the queue according to a predicate. The first queue contains all elements O which satisfy the predicate, the second all elements that fail the predicate. P O(k log n). Takes the first k/ (key, value) pairs in the queue, or the first n if k >= n.  (P k q == : k (` q)) Q O(k log n). Deletes the first k? (key, value) pairs in the queue, or returns an empty queue if k >= n. R O(k log n). Equivalent to (P k q, Q k q). SHTakes the longest possible prefix of elements satisfying the predicate.  (S p q == ; (p . <) (` q)) THTakes the longest possible prefix of elements satisfying the predicate.  (S p q == ; (uncurry p) (` q)) UJRemoves the longest possible prefix of elements satisfying the predicate. VJRemoves the longest possible prefix of elements satisfying the predicate. WEquivalent to (S p q, U p q). XEquivalent to W (= . p). YEquivalent to (T p q, V p q). ZEquivalent to Y ( k a -> = (p k a)) q. [O(n)?. Build a priority queue from the list of (key, value) pairs. \O(n)I. Build a priority queue from an ascending list of (key, value) pairs.  The precondition is not checked. ]O(n)I. Build a priority queue from a descending list of (key, value) pairs.  The precondition is not checked. ^ O(n log n)4. Return all keys of the queue in ascending order. _ O(n log n)?. Return all elements of the queue in ascending order by key. ` O(n log n)<. Return all (key, value) pairs in ascending order by key. a O(n log n)=. Return all (key, value) pairs in descending order by key. b O(n log n). Equivalent to `. 5If the traversal order is irrelevant, consider using g. c O(n log n). Equivalent to `. dO(n)8. Return all keys of the queue in no particular order. eO(n)<. Return all elements of the queue in no particular order. fO(n). Equivalent to g. gO(n)G. Returns all (key, value) pairs in the queue in no particular order. hO(n)S. An unordered right fold over the elements of the queue, in no particular order. iO(n)R. An unordered left fold over the elements of the queue, in no particular order. jO(n)I. An unordered traversal over a priority queue, in no particular order. V While there is no guarantee in which order the elements are traversed, the resulting ) priority queue will be perfectly valid. kO(n)I. An unordered traversal over a priority queue, in no particular order. V While there is no guarantee in which order the elements are traversed, the resulting ) priority queue will be perfectly valid. @ @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk@@ABCDE F G H IPQRSTUVWYXZLMNOJ K[\]^_c`abhijkdefg,@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkportable experimentallibraries@haskell.orgFl&A priority queue where values of type a! are annotated with keys of type k. = The queue supports extracting the element with maximum key. >?@ABCmO(1)%. Returns the empty priority queue. nO(1)*. Constructs a singleton priority queue. o Amortized O(1) , worst-case O(log n) . Inserts 3 an element with the specified key into the queue. p Amortized O(log(min(n1, n2))) , worst-case O(log(max(n1, n2))). Returns the union  of the two specified queues. q The union of a list of queues: (q == 7 p m). rO(1)+. Checks if this priority queue is empty. sO(1),. Returns the size of this priority queue. tO(1)3. The maximal (key, element) in the queue. Calls 8 if empty. uO(1)F. The maximal (key, element) in the queue, if the queue is nonempty. vO(log n)<. Delete and find the element with the maximum key. Calls 8 if empty. wO(log n)<. Delete and find the element with the maximum key. Calls 8 if empty. xO(1)M. Alter the value at the maximum key. If the queue is empty, does nothing. yO(1)M. Alter the value at the maximum key. If the queue is empty, does nothing. zO(log n) . (Actually O(1) if there'6s no deletion.) Update the value at the maximum key. & If the queue is empty, does nothing. {O(log n) . (Actually O(1) if there'6s no deletion.) Update the value at the maximum key. & If the queue is empty, does nothing. |O(log n)S. Retrieves the value associated with the maximum key of the queue, and the queue  stripped of that element, or ì if passed an empty queue. }O(log n)T. Retrieves the maximal (key, value) pair of the map, and the map stripped of that  element, or ì if passed an empty map. ~O(n)0. Map a function over all values in the queue. O(n)0. Map a function over all values in the queue. €O(n)0. Map a function over all values in the queue. O(n).  f q == € f q, but only works when f is strictly  monotonic.  The precondition is not checked., This function has better performance than  €. ‚ O(n log n)3. Fold the keys and values in the map, such that  ‚ f z q == D (ð f) z (ž q). =If you do not care about the traversal order, consider using ¢. ƒ O(n log n)3. Fold the keys and values in the map, such that  ƒ f z q == 7 (ð . f) z (ž q). =If you do not care about the traversal order, consider using ¤. „ O(n log n)C. Traverses the elements of the queue in descending order by key.  („ f q == š  $ 9 (ð f) (Ÿ q)) If you do not care about the order" of the traversal, consider using ¦. … O(k log n). Takes the first k/ (key, value) pairs in the queue, or the first n if k >= n.  (… k q == : k (Ÿ q)) † O(k log n). Deletes the first k? (key, value) pairs in the queue, or returns an empty queue if k >= n. ‡ O(k log n). Equivalent to (… k q, † k q). ˆHTakes the longest possible prefix of elements satisfying the predicate.  (ˆ p q == ; (p . <) (ž q)) ‰HTakes the longest possible prefix of elements satisfying the predicate.  (ˆ p q == ; (uncurry p) (ž q)) ŠJRemoves the longest possible prefix of elements satisfying the predicate. ‹JRemoves the longest possible prefix of elements satisfying the predicate. ŒEquivalent to (ˆ p q, Š p q). Equivalent to Œ (= . p). ŽEquivalent to Ž ( k a -> = (p k a)) q. Equivalent to Ž ( k a -> = (p k a)) q. O(n)1. Filter all values that satisfy the predicate. ‘O(n)1. Filter all values that satisfy the predicate. ’O(n)X. Partition the queue according to a predicate. The first queue contains all elements O which satisfy the predicate, the second all elements that fail the predicate. “O(n)X. Partition the queue according to a predicate. The first queue contains all elements O which satisfy the predicate, the second all elements that fail the predicate. ”O(n). Map values and collect the í results. •O(n). Map values and collect the í results. –O(n). Map values and separate the î and ï results. —O(n). Map values and separate the î and ï results. ˜O(n)?. Build a priority queue from the list of (key, value) pairs. ™O(n)I. Build a priority queue from an ascending list of (key, value) pairs.  The precondition is not checked. šO(n)I. Build a priority queue from a descending list of (key, value) pairs.  The precondition is not checked. › O(n log n)4. Return all keys of the queue in ascending order. œ O(n log n)?. Return all elements of the queue in ascending order by key.  O(n log n). Equivalent to Ÿ. ž O(n log n)<. Return all (key, value) pairs in ascending order by key. Ÿ O(n log n)=. Return all (key, value) pairs in descending order by key.   O(n log n). Equivalent to ž. 5If the traversal order is irrelevant, consider using ª. ¡O(n)S. An unordered right fold over the elements of the queue, in no particular order. ¢O(n)S. An unordered right fold over the elements of the queue, in no particular order. £O(n)R. An unordered left fold over the elements of the queue, in no particular order. ¤O(n)R. An unordered left fold over the elements of the queue, in no particular order. ¥O(n)I. An unordered traversal over a priority queue, in no particular order. V While there is no guarantee in which order the elements are traversed, the resulting ) priority queue will be perfectly valid. ¦O(n)I. An unordered traversal over a priority queue, in no particular order. V While there is no guarantee in which order the elements are traversed, the resulting ) priority queue will be perfectly valid. §O(n)8. Return all keys of the queue in no particular order. ¨O(n)<. Return all elements of the queue in no particular order. ©O(n). Equivalent to ª. ªO(n)G. Returns all (key, value) pairs in the queue in no particular order. «O(log n). Analogous to deepseq in the deepseq: package, but only forces the spine of the binomial heap. @lmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«@lmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«@lmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«)¬E­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËFGÌÍÎÏÐÑ&¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑ&¬¯°±²³­®´µ¶·¸¹º¼½»ÀÁÂÃÄÅÆÇÈÍÎÏÉÊËо¿ÌÑ&¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑH           !"#$%&'()*+,-./0123456789:;<=>(%&'?@3AB1C2D./0*E+F,-GH9:;IJ456KL<M="#>NO   (  PQRSTUVWXY3AB./0*E+F,-GH1C2D9:;IJK456"#>NL<M=Z     (PQRSX3[\]"#./0*+,-12J65=9;:^_`abbcddeeffghijklmnopqrstuvwuvxuyzuy{u|}~€‚ƒ„…†‡ˆ‰uvŠ‹uyŒŽ_`abbceeddffhijkgu‘’u‘“m”•–—u˜™š›st…†œžŸ ~¡¢ƒ£¤¥u¦]§nopqu¨]u©ªu«[u¨.u¨*u|¬u‘­®¯¯°opu˜\±4<² pqueue-1.0.0Data.PQueue.Prio.MinData.PQueue.MinData.PQueue.Prio.MaxData.PQueue.MaxData.PQueue.Prio.InternalsData.PQueue.Internals MinPQueueemptynullsize singletoninsertuniongetMinalterMinWithKeyupdateMinWithKeyminViewWithKey mapWithKeymapKeysMonotonicmapMaybeWithKeymapEitherWithKey foldrWithKey foldlWithKey foldrWithKeyU foldlWithKeyUseqSpineMinQueueminViewmapMaybe mapEither mapMonotonicfoldrAscfoldlAscfoldrUfoldlU keysQueuefindMin deleteMin deleteFindMinunions!! takeWhile dropWhilespanbreaktakedropsplitAtfilter partitionmap toAscList toDescListtoList foldrDesc foldlDescfromList fromAscList fromDescListelemsUtoListU traverseUalterMin updateMinmapKeystraverseWithKey filterWithKeypartitionWithKeytakeWhileWithKeydropWhileWithKey spanWithKey breakWithKeykeyselemsassocskeysUassocsUtraverseWithKeyU MaxPQueuefindMaxgetMax deleteMax deleteFindMaxalterMaxalterMaxWithKey updateMaxupdateMaxWithKeymaxViewmaxViewWithKeyMaxQueuetraversefoldrfoldl pqueueKeysMExtractYesNoExtractLEqSuccZero BinomTree BinomHeap BinomForestConsSkipNilMinPQEmpty.:first'second'uncurry'<>insert'union'base Data.MaybeNothingJust Data.EitherLeftRight Data.Tupleuncurry insertMintipmeld mergeForest carryForestincrincrMin extractHeap incrExtract extractForest mapForest mapMaybeFMaybe mapEitherFEitherfoldrWithKeyF_foldlWithKeyF_ mapKeysMonoF Partition GHC.ClassesEqOrd queueDataType emptyConstr consConstrminQTCGHC.Basefmap foldrUnfold foldlUnfold incrExtract' extractBin mapMaybeQueuemapEitherQueue insertMinQmergecarryjoinBin seqSpineFkeysF Data.Foldable foldWhileFBGHC.ListGHC.ErrerrorData.TraversablesndnotMaxPQDownunDownMaxQ