úÎVÂSz-      !"#$%&'()*+,Portable ExperimentalDan Doel:A type of comparisons between two values of a given type. -1Swaps the elements at two positions in an array. .-.-.Portable ExperimentalDan Doel$Sorts the elements at the positions off and 'off + 1' in the given  array using the comparison. GSorts the elements at the two given indices using the comparison. This K is essentially a compare-and-swap, although the first index is assumed to  be the lower of the two. DSorts the three elements starting at the given offset in the array. GSorts the elements at the three given indices. The indices are assumed + to be given from lowest to highest, so if 'l < m < u' then  'sort3ByIndex cmp a m l u'0 essentially sorts the median of three into the  lowest position in the array. 1Sorts the four elements beginning at the offset. GSorts the elements at the four given indices. Like the 2 and 3 element K versions, this assumes that the indices are given in increasing order, so E it can be used to sort medians into particular positions and so on. Portable ExperimentalDan Doel@Sorts an entire array using the default comparison for the type /Sorts an entire array using a given comparison 1Sorts the portion of an array delimited by [l,u) GSorts the portion of the array delimited by [l,u) under the assumption  that [l,m) is already sorted. /   Non-portable (type operators) ExperimentalDan Doel <dan.doel@gmail.com> 2Sorts an entire array using the default ordering. /Sorts an entire array using a custom ordering. :Sorts a portion of an array [l,u) using a custom ordering 7Moves the lowest k elements to the front of the array. . The elements will be in no particular order.  Moves the lowest+ (as defined by the comparison) k elements B to the front of the array. The elements will be in no particular  order.  Moves the lowest( k elements in the portion [l,u) of the ; array into the positions [l,k+l). The elements will be in  no particular order. ?Moves the lowest k elements to the front of the array, sorted. >Moves the lowest k elements (as defined by the comparison) to ! the front of the array, sorted. >Moves the lowest k elements in the portion [l,u) of the array ! into positions [l,k+l), sorted. 2Constructs a heap in a portion of an array [l, u) >Given a heap stored in a portion of an array [l,u), swaps the > top of the heap with the element at u and rebuilds the heap. AGiven a heap stored in a portion of an array [l,u) swaps the top D of the heap with the element at position t, and rebuilds the heap. >Given a heap stored in a portion of an array [l,u), sorts the A highest values into [m,u). The elements in [l,m) are not in any  particular order. 01   ,Non-portable (type operators, bang patterns) ExperimentalDan Doel <dan.doel@gmail.com> 2Sorts an entire array using the default ordering. /Sorts an entire array using a custom ordering. :Sorts a portion of an array [l,u) using a custom ordering 28Moves the least k elements to the front of the array in  no particular order. =Moves the least k elements (as defined by the comparison) to 0 the front of the array in no particular order. BMoves the least k elements in the interval [l,u) to the positions ! [l,k+l) in no particular order. >Moves the least k elements to the front of the array, sorted. =Moves the least k elements (as defined by the comparison) to ! the front of the array, sorted. BMoves the least k elements in the interval [l,u) to the positions  [l,k+l), sorted. 345    Portable ExperimentalDan Doel <dan.doel@gmail.com>!-Sorts an array using the default comparison. "*Sorts an array using a custom comparison. #=Sorts a portion of an array [l,u) using a custom comparison. 678!"#!"#!"#3Non-portable (scoped type variables, bang patterns) ExperimentalDan Doel <dan.doel@gmail.com> $%6The number of passes necessary to sort an array of es &The size of an auxiliary array '5The radix function parameterized by the current pass (,Sorts an array based on the Radix instance. )4Radix sorts an array using custom radix information 8 requires the number of passes to fully sort the array, 6 the size of of auxiliary arrays necessary (should be : one greater than the maximum value returned by the radix 7 function), and a radix function, which takes the pass 1 and an element, and returns the relevant radix. the number of passes the size of auxiliary arrays the radix function the array to be sorted 9:;<=>?$%&'()()$%&'$%&'%&'()Non-portable (rank-2 types) ExperimentalDan Doel <dan.doel@gmail.com>*@Safely applies a mutable array algorithm to an immutable array. +<Uses a function to compute a key for each element which the C algorithm should use in lieu of the actual element. For instance:   usingKeys sortBy f arr $should produce the same results as:   sortBy (comparing f) arr @the difference being that usingKeys computes each key only once : which can be more efficient for expensive key functions. ,BAs usingKeys, only the key function has access to the array index " at which each element is stored. *+,*+,*+,@      !"#$%&'()*+,-./-01234567uvector-algorithms-0.2$Data.Array.Vector.Algorithms.Optimal&Data.Array.Vector.Algorithms.Insertion$Data.Array.Vector.Algorithms.TriHeap"Data.Array.Vector.Algorithms.Intro"Data.Array.Vector.Algorithms.Merge"Data.Array.Vector.Algorithms.Radix(Data.Array.Vector.Algorithms.Combinators#Data.Array.Vector.Algorithms.Common Comparison sort2ByOffset sort2ByIndex sort3ByOffset sort3ByIndex sort4ByOffset sort4ByIndexsortsortBy sortByBounds sortByBounds'selectselectByselectByBounds partialSort partialSortBypartialSortByBoundsheapifypoppopTosortHeapRadixpassessizeradixapply usingKeys usingIxKeysswapmcopyMUinsert siftByOffset maximumChild introsort partitionByilg thresholdmergeSortWithBufmerge radixLoopbodyzero countLoop prefixLoopmoveLoopinc