K W2F.55.5.0+dev0-2025-04-28/&Iarray!tA;!a@@A@A&iarrayzB@@@@Y@@@@@7../../stdlib/iarray.mli^^@@@@&Iarray@@A@&length@{!a@B@@@@#int|@@@@@-%array_lengthAA @@@$a%a"@@#A@@#get@:}!a@B@@@@@$~@@@@@@@/%array_safe_getBA#@@@@GdppHdp@@FB@@$init@9@@@@@B@@@!a@B@@@q @@@@@@@@llml@@kC@@&append@!a@B@@@@@@@@@@@@@@@@v S Sv S @@D@@&concat@$list!a@B@@@@@@@ @@@@@@| S S| S {@@E@@#sub@!a@B@@@@#pos@@@#len@@@@@@@@@@@@@    @@F@@'to_list@!a@B@@@@_ @@@@@@I  I  @@G@@'of_list@p!a@B@@@@# @@@@@@L  L  @@H@@(to_array@4!a@B@@@@%array @@@@@@<U=U@@;I@@(of_array@!a@ B@@@@^ @@@ @@ @YYZY@@XJ@@%equal@@!a@B@@$bool@@@@@@@@@@@@@@@@@@@@@@@@@_tt_t@@K@@'compare@@!a@)B@@@@@@@@@@@@@!@@@@#@@@$@@%@@&@@'@dyydy@@L@@$iter@@!a@3B@*$unit@@@+@@,@@@@.@@@/@@0@@1@mm@@M@@%iteri @@@@@4@!a@?B@5-@@@6@@7@@8@ @@@::@@@;@@<@@=@ r r@@ N@@#map!@@!a@JB@@!b@LB@A@@B@0@@@D6@@@F@@G@@H@1w2w@@0O@@$mapi"@@%@@@M@!a@YB@N!b@[B@O@@P@@Q@^@@@Sd@@@U@@V@@W@_|`|@@^P@@)fold_left#@@!a@fB@\@!b@hB@]@@^@@_@@@@@a@@b@@c@@d@OOO@@Q@@-fold_left_map$@@!a@xB@i@!b@zB@j@@!c@|B@k@@l@@m@@n@@@@@p@(@@@@r@@s@@t@@u@@v@%%9u@@R@@*fold_right%@@!b@B@}@!a@B@~@@@@@@@@@@@@@@@@*@@S@@%iter2&@@!a@B@@!b@B@6@@@@@@@@@@@@@@@K@@@@@@@@@@1@@T@@$map2'@@!a@B@@!b@B@!c@B@@@@@@I@@@@Q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./@@ah@@@@A7../../stdlib/iarray.mli @Operations on immutable arrays. This module mirrors the API of %Array l, but omits functions that assume mutability; in addition to obviously mutating functions, it omits $copy: along with the functions $make", ,create_float*, and +make_matrix that produce all-constant arrays. The exception is the sorting functions, which are given a copying API to replace the in-place one.@#(Iarray.t3 *An alias for the type of immutable arrays.@@@@@@@@@@@@Y@@A@@@-Iarray.length3 DReturn the length (number of elements) of the given immutable array.@@@@@@@@@@@@@ @@@@*Iarray.get3'get a n< returns the element number !n4 of immutable array !a D. The first element has number 0. The last element has number ,length a - 1!.@@@@@@@@0Invalid_argument#if !n; is outside the range 0 to .(length a - 1)!.@@@@@@7@:@@@@+Iarray.init3(init n f + returns a fresh immutable array of length !n9, with element number !i> initialized to the result of #f i5. In other terms, (init n f: tabulates the results of !f< applied to the integers !0$ to #n-1!.@@@@@@@@0Invalid_argument#if %n < 0$ or 8n > Sys.max_array_length;. If the return type of !f$ is %float #, then the maximum size is only 8Sys.max_array_length / 2!.@@@@@@@@@@@ܠ-Iarray.append3,append v1 v2 Y returns a fresh immutable array containing the concatenation of the immutable arrays "v1% and "v2!.@@@@@@@@0Invalid_argument&if ,length v1 + length v2 > Sys.max_array_length!.@@@@@@@@@@@䠕-Iarray.concat3(Same as 6D@ ., but concatenates a list of immutable arrays.@@@@@@@@@@@@@@@@@ՠ*Iarray.sub3/sub a ~pos ~len + returns a fresh immutable array of length #len $, containing the elements number #pos$ to -pos + len - 17 of immutable array !a I. This creates a copy of the selected portion of the immutable array.@@@@@@@@0Invalid_argument#if #pos% and #len ) do not designate a valid subarray of !a1; that is, if 'pos < 0%, or 'len < 0%, or 4pos + len > length a!.@@@@@@3@@  @@@@.Iarray.to_list3)to_list a ) returns the list of all the elements of !a!.@@@@@@@@@@@@ @Q @@@@.Iarray.of_list3)of_list l ? returns a fresh immutable array containing the elements of !l!.@@@@@@@@0Invalid_argument1if the length of !l4 is greater than 4Sys.max_array_length!.@@@@@@{@@@@A@ %Converting to and from mutable arrays@@/Iarray.to_array3*to_array a / returns a mutable copy of the immutable array !a F; that is, a fresh (mutable) array containing the same elements as !a@@@@@@@@@@@@@@@@@ /Iarray.of_array3+of_array ma 0 returns an immutable copy of the mutable array "ma F; that is, a fresh immutable array containing the same elements as "ma@@@@@@@@@@@@@@@@@ A@*Comparison@@,Iarray.equal3 !eq [|a1; ...; an|] [|b1; ..; bm|] c holds when the two input immutable arrays have the same length, and for each pair of elements &ai, bi " at the same position we have (eq ai bi!.@@@@@@@@@@@@!@"@@@@@@.Iarray.compare36Provided the function #cmp % defines a preorder on elements, /compare cmp a b0 compares first !a% and !b f by their length, and then, if equal, by their elements according to the lexicographic preorder.@ 3 For more details on comparison functions, see +Iarray.sortD@!.@@@@@@@@@@@@)@*@@@@@@A@)Iterators@@+Iarray.iter3(iter f a2 applies function !f # in turn to all the elements of !a:. It is equivalent to ;f (get a 0); f (get a 1); ...; f (get a (length a - 1)); ()!.@@@@@@@@@@@@+@F,@I@@@@,Iarray.iteri3(Same as 0D@ }, but the function is applied to the index of the element as first argument, and the element itself as second argument.@@@@@@@@@@@@@^@a @@@@*Iarray.map3'map f a2 applies function !f8 to all the elements of !a @, and builds an immutable array with the results returned by !f%: =[| f (get a 0); f (get a 1); ...; f (get a (length a - 1)) |]!.@@@@@@@@@@@@@@@@@@+Iarray.mapi3(Same as 6D@ }, but the function is applied to the index of the element as first argument, and the element itself as second argument.@@@@@@@@@@@@@@@@@@0Iarray.fold_left32fold_left f init a- computes 8f (... (f (f init (get a 0)) (get a 1)) ...) (get a n-1)+, where !n & is the length of the immutable array !a!.@@@@@@@@@@@@@ @ @@@@@4Iarray.fold_left_map3-fold_left_map5 is a combination of 6D@% and D@ 2 that threads an accumulator through calls to !f!.@@@@@@@@@@@@ @@@@@@@䠕1Iarray.fold_right33fold_right f a init- computes ;f (get a 0) (f (get a 1) ( ... (f (get a (n-1)) init) ...))+, where !n & is the length of the immutable array !a!.@@@@@@@@@@@@@@!@$@@@@頙A@7Iterators on two arrays@@,Iarray.iter23+iter2 f a b2 applies function !f8 to all the elements of !a( and !b!.@@@@@@@@0Invalid_argument .if the immutable arrays are not the same size.@@@@@ @U @X@[@@@@렕+Iarray.map23*map2 f a b2 applies function !f8 to all the elements of !a( and !b =, and builds an immutable array with the results returned by !f%: ^[| f (get a 0) (get b 0); ...; f (get a (length a - 1)) (get b (length b - 1))|]!.@@@@@@@@0Invalid_argument .if the immutable arrays are not the same size.@@@@@@@@@@@@𠙠A@.Array scanning@@.Iarray.for_all39for_all f [|a1; ...; an|] H checks if all elements of the immutable array satisfy the predicate !f9. That is, it returns !(f a1) && (f a2) && ... && (f an)!.@@@@@@@@@@@@@@@@@@-Iarray.exists38exists f [|a1; ...; an|] S checks if at least one element of the immutable array satisfies the predicate !f:. That is, it returns !(f a1) || (f a2) || ... || (f an)!.@@@@@@@@@@@@@@@@@@/Iarray.for_all23(Same as KD@ #, but for a two-argument predicate.@@@@@@@@0Invalid_argument 6if the two immutable arrays have different lengths.@@@@@@@@@@@@۠.Iarray.exists23(Same as KD@ #, but for a two-argument predicate.@@@@@@@@0Invalid_argument 6if the two immutable arrays have different lengths.@@@@@@@@"@@@@Ǡ*Iarray.mem3)mem a set8 is true if and only if !a , is structurally equal to an element of !l3 (i.e. there is an !x$ in !l/ such that /compare a x = 0").@@@@@@@@@@@@@R@U@@@@ܠ+Iarray.memq3(Same as  0 if and only if 'cmp y x$ < 0@% if 'cmp x y* >= 0 and 'cmp y z+ >= 0 then 'cmp x z% >= 0@@2 The result of $sort3, which we'll call "a' #, contains the same elements as !a @, reordered in such a way that for all i and j valid indices of !a9 (or equivalently, of "a'"):" 9cmp (get a' i) (get a' j); >= 0 if and only if i >= j@@@@@@@@@@@@@@K@L@>@@@@42Iarray.stable_sort3(Same as D@ , but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.@ W The current implementation uses Merge Sort. It uses a temporary array of length #n/2(, where !n c is the length of the immutable array. It is usually faster than the current implementation of D@!.@@@@@@@@@@@@Q@2R@5D@@@@:0Iarray.fast_sort3(Same as 6D@$ or =D@ +, whichever is faster on typical input.@@@@@@@@@@@@G@PH@S:@@@@0A@)Iterators@@-Iarray.to_seq3 4Iterate on the immutable array, in increasing order.@@@@@@@@@@@@8@i9@@@@$.Iarray.to_seqi3 YIterate on the immutable array, in increasing order, yielding indices along elements.@@@@@@@@@@@@%@x&@@@@-Iarray.of_seq3 ,Create an immutable array from the generator@@@@@@@@@@@@@@@@@@@@@A&Stdlib#Seq@@@@@