Caml1999I037_.Stdlib__Iarray!t;!a@@A@A&iarrayT @@@۠Y@@@@@*iarray.mli^^@@@@@@A@&length@!a@@@@#intA@@@@@ߐ-%array_lengthAA @@@ a!a@@:A@@#get@4!a@@@@@!@@@ @@@@/%array_safe_getBA@@@@?dRR@dR@@YB@@$init@5@@@@@=@@@!a@@@c@@@@@@@@_lyy`ly@@yC@@&append@s!a@@@@@~ @@@@@@@@@@@v 5 5v 5 e@@D@@&concat@$listK!a@@@@@@@ @@@@@@| 5 5| 5 ]@@E@@#sub@!a@@@@#pos@@@#len@@@̠@@@@@@@@@@    @@F@@'to_list@ܠ!a@@@@R @@@@@@I e eI e @@G@@'of_list@b!a@@@@ @@@@@@L  L  @@H@@(to_array@!a@@@@%arrayJ @@@ @@ @UU@@/I@@(of_array@!a@ @@@ 2 @@@ @@@.Y/Y@@HJ@@%equal@@!a@@$boolE@@@@@@@@R@@@@Y@@@@@@@@@@@@@Y_VVZ_V@@sK@@'compare@@!a@@W@@@@@@@@{@@@@@@@i@@@@@ @@!@@"@d[[d[@@L@@$iter@@!a@%$unitF@@@#@@$@@@@& @@@'@@(@@)@mm@@M@@%iteri@@@@@*@!a@.(@@@+@@,@@-@ʠ@@@/3@@@0@@1@@2@rr@@N@@#map@@!a@4!b@6@@3@@@@5@@@7@@8@@9@wmmwm@@O@@$mapi@@@@@:@!a@=!b@?@@;@@<@@@@>@@@@@@A@@B@|ff|f@@,P@@)fold_left@@!a@G@!b@E @@C@@D@ @6 @@@F@@H@@I@@J@21131j@@LQ@@-fold_left_map@@!a@R@!b@N@@!c@P@@K@@L@@M@@`@@@O@!@k@@@Q@@S@@T@@U@@V@ghW@@R@@*fold_right@@!b@Y@!a@[@@W@@X@@@@Z@  @@\@@]@@^@ @@S@@%iter2@@!a@b@!b@d @@@_@@`@@a@@@@c@@@@e@@@f@@g@@h@@i@@@T@@$map2@@!a@l@!b@n!c@p@@j@@k@ڠ@@@m@@@@o@@@q@@r@@s@@t@@@U@@'for_all@@!a@w@@@u@@v@@@@x@@@y@@z@@{@RRR@@V@@&exists@@!a@~@@@|@@}@"@@@@@@@@@@@"..#.\@@!a@@@@#Seq!t@4@@@@@@@@@@@@P-M-MQ-M-x@@jf@@&of_seq@<#Seq!t!a@@@@p @@@@@@l--m--@@g@@*unsafe_get@!a@@@@@m@@@ @@@@1%array_unsafe_getBAk@@@@....@@h@@@_L.Stdlib__Iarray0.Au˸_+Stdlib__Seq0nwzG&amg.Stdlib__Either0Vy`u~c à&Stdlib0Lku]8_٠8CamlinternalFormatBasics0%FU(Q/Tu@@@Caml1999T037>neC.Stdlib__Iarrayࠐ&Stdlib&Stdlib*iarray.mliRR@@@3@@@@@@#intA;@@@A@@@@@&_none_@@A@A@$charB;@@A@@@@@@A@&stringQ;@@ A@@@@@ @@@%bytesC;@@A@@@@@@@@%floatD;@@A@@@@@@@@$boolE;@@%falsec@@@$trued@@#@@@A@@@@@$@A@$unitF;@@"()e@@.@@@A@@@@@/@A@ #exnG;@@@A@@@@@3@@@#effH;@@O@A@A@@@@@@<@@@,continuationI;@@Q@@P@B@A@nY@@@@@@K@@@%arrayJ;@@R@A@A@@@@@@U@@@ $listK;@@S@A"[]f@@b@"::g@@@T@@o@ @@A@Y@@@@@r@@@&optionL;@@V@A$Noneh@@@$Somei@@@@@A@Y@@@@@@@@)nativeintM;@@A@@@@@@@@%int32N;@@A@@@@@@@@%int64O;@@A@@@@@@@@&lazy_tP;@@X@AJA@Y@@@@@@@@5extension_constructorR;@@A@@@@@@@@*floatarrayS;@@A@@@@@@@@&iarrayT;@@Y@A[A@Y@@@@@@@@*atomic_locU;@@Z@AdA@@@@@@@@@.Assert_failure`#@@@@@J@@@@@@@@[@@AϠ=ocaml.warn_on_literal_patternӐ@@0Division_by_zero]#@@@A٠  @+End_of_file\#$@@@Aᠰ@'FailureY#,@'@@A꠰@0Invalid_argumentX#5@0@@A󠰠$#@-Match_failureV#>@@=@9@;@@a@@A54@)Not_foundZ#O@@@A =<@-Out_of_memoryW#W@@@AED@.Stack_overflow^#_@@@AML@.Sys_blocked_io_#g@@@A$U'T'@)Sys_error[#o@j@@A-^0]0@:Undefined_recursive_modulea#x@@w@s@u@@h@@A>oAnA@:Continuation_already_takenb#@@@AFwIvI@@AzRy@@3xwwxxxxx@u@A{@*ocaml.textU  Operations on immutable arrays. This module mirrors the API of [Array], 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. @since 5.4 T\@@@@@@A+!tA^^@А!a@3@;@@@A@A@@@@@@G@B@@@^^@)ocaml.doc , An alias for the type of immutable arrays. __@@@@@@@@@@@@A^^@@@A@;0@A@A8B@@@@Y@@@@@%"@@@@Aг &iarray^+@А!aD^^@@@G3@@5210@00@@@0@0@@@?@&lengthaa@б@г0&iarray a a@А!a@B@3@I@Aaa@@@ @@@ @@г#int%a&a@@ @@@@@@@@@@-%array_lengthAA @@@5a6a@ F Return the length (number of elements) of the given immutable array. CbDbP@@@@@@@UA@@@@@@@@@?#get[dR[\dR^@б@г&iarrayfdRdgdRj@А!a@B@3nmmnnnnn@^yE@AtdRaudRc@@@ @@@ @@б@гV#intdRndRq@@ @@@@@А!a!dRudRw@@@ &@@!@@@@@$"@@/%array_safe_getBAh@@@@dRRdR@琠 [get a n] returns the element number [n] of immutable array [a]. The first element has number 0. The last element has number [length a - 1]. @raise Invalid_argument if [n] is outside the range 0 to [(length a - 1)]. ej?w@@@@@@@B@@@@@@@@@J$initly}ly@б@г#intlyly@@ @@@3@c~?@A@@б@б@г#intlyly@@ @@@@@А!a@B@lyly@@@ @@!@@г#&iarraylyly@А!a/lyly@@@@@@6 @@@@@9 ly@@@@@@=C@@@lyy@\  [init n f] returns a fresh immutable array of length [n], with element number [i] initialized to the result of [f i]. In other terms, [init n f] tabulates the results of [f] applied to the integers [0] to [n-1]. @raise Invalid_argument if [n < 0] or [n > Sys.max_array_length]. If the return type of [f] is [float], then the maximum size is only [Sys.max_array_length / 2].  m!t  3@@@@@@@2C@@'@l@@@@@@\&append7v 5 98v 5 ?@б@гi&iarrayBv 5 ECv 5 K@А!a@B@3JIIJJJJJ@{>@APv 5 BQv 5 D@@@ @@@ @@б@г&iarray`v 5 Rav 5 X@А!agv 5 Ohv 5 Q@@@$@@@  @@г&iarrayuv 5 _vv 5 e@А!a3.|v 5 \}v 5 ^@@@9@@@5 @@@@@8@@@6@@;9@@@v 5 5@Ԑ [append v1 v2] returns a fresh immutable array containing the concatenation of the immutable arrays [v1] and [v2]. @raise Invalid_argument if [length v1 + length v2 > Sys.max_array_length]. w f fz  3@@@@@@@D@@&@q@@@@@@Z&concat| 5 9| 5 ?@б@г2$list| 5 L| 5 P@г렐&iarray| 5 E| 5 K@А!a@B@3@H@A| 5 B| 5 D@@@ @@@ @@@&@@@ #@@г &iarray| 5 W| 5 ]@А!a!| 5 T| 5 V@@@'@@@# @@@@@&$@@@| 5 5@A A Same as {!append}, but concatenates a list of immutable arrays. } ^ ^} ^ @@@@@@@E@@#@Qސ@@@@@@E#sub    @б@гN&iarray'  (  @А!a@B@3/../////@d>@A5  6  @@@ @@@ @@б#posг#intG  H  @@ @@@@@б#lenг*#intX  Y  @@ @@@+@@г&iarraye  f  @А!a>9l  m  @@@D@@@@ @@&@@Cv  @@;0@@Gz  @@@F@@KI@@@  @ɐ  [sub a ~pos ~len] returns a fresh immutable array of length [len], containing the elements number [pos] to [pos + len - 1] of immutable array [a]. This creates a copy of the selected portion of the immutable array. @raise Invalid_argument if [pos] and [len] do not designate a valid subarray of [a]; that is, if [pos < 0], or [len < 0], or [pos + len > length a]. @  G * c@@@@@@@F@@+@f@@@@@@j'to_listI e iI e p@б@г֠&iarrayI e vI e |@А!a@B@3@>@AI e sI e u@@@ @@@ @@гC$listI e I e @А!aI e I e @@@"@@@ @@@@@!@@@I e e@' : [to_list a] returns the list of all the elements of [a]. J  J  @@@@@@@G@@#@7Đ@@@@@@@'of_listL  L  @б@г$list L  L  @А!a@B@3@_z>@AL  L  @@@ @@@ @@гP&iarray)L  *L  @А!a0L  1L  @@@"@@@ @@@@@!@@@<L  @ [of_list l] returns a fresh immutable array containing the elements of [l]. @raise Invalid_argument if the length of [l] is greater than [Sys.max_array_length]. IM  JQ@@@@@@@[H@@#@"@@@@@@@/ + {1 Converting to and from mutable arrays} gShS@@@@@@3feefffff@Rm1@A(to_arraysUtU@б@г&iarray~UU@А!a@B@ UU@@@ @@@'@@г%arrayUU@А!a5UU@@@ @@@< @@@@@?@@@U@ [to_array a] returns a mutable copy of the immutable array [a]; that is, a fresh (mutable) array containing the same elements as [a] VWE@@@@@@@I@@#@@@@@@@^(of_arrayYY@б@г\%arrayYY@А!a@ B@3@}x>@AYY@@@ @@@ @@г&iarrayYY@А!aYY@@@"@@@  @@@@@ !@@@ Y@R [of_array ma] returns an immutable copy of the mutable array [ma]; that is, a fresh immutable array containing the same elements as [ma] Z[=@@@@@@@(J@@#@b@@@@@@@0 {1 Comparison} 4]??5]?T@@@@@@332233333@Rm1@A%equal@_VZA_V_@б@б@А!a@B@O_VcP_Ve@@б@А!a  W_ViX_Vk@@г$bool`_Voa_Vs@@ @@@/@@@@@2@@@"@@5 @@б@г&iarrayu_V{v_V@А!a2E|_Vx}_Vz@@@8@@@L @@б@г&iarray_V_V@А!aI\_V_V@@@O@@@c @@г[$bool_V_V@@ @@@p@@@@@s@@@.@@v1 @@@F@@y_Vb@@@_VV@ [eq [|a1; ...; an|] [|b1; ..; bm|]] 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]. `b1Y@@@@@@@K@@"@ @@@@@@'compared[_d[f@б@б@А!a@)B@3@6@Ad[jd[l@@б@А!a d[pd[r@@гˠ#intd[vd[y@@ @@@@@@!@@@@@$@@ @@б@г5&iarrayd[d[@А!a4/d[~d[@@@:@@@!6 @@б@гL&iarray%d[&d[@А!aKF,d[-d[@@@Q@@@#M @@г #int:d[;d[@@ @@@$Z@@@@@%]@@@.@@&`1 @@@F@@'cId[i@@@Ld[[@  Provided the function [cmp] defines a preorder on elements, [compare cmp a b] compares first [a] and [b] by their length, and then, if equal, by their elements according to the lexicographic preorder. For more details on comparison functions, see {!Iarray.sort}. YeZit@@@@@@@kL@@"@2@@@@@@?/ {1 Iterators} wkxk@@@@@@3vuuvvvvv@1@A$itermm@б@б@А!a@3B@*mm@@гD$unitmm@@ @@@+'@@@@@,*@@б@гԠ&iarraymm@А!a':mm@@@-@@@.A @@гk$unitmm@@ @@@/N@@@@@0Q@@@,@@1Tm @@@m@ [iter f a] 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)); ()]. np]@@@@@@@M@@@*@@@@@@t%iteri rr@б@б@гԠ#intrr@@ @@@43@:@A@@б@А!a@?B@5 rr@@гǠ$unitrr@@ @@@6@@@@@7@@@%@@8"( @@б@гZ&iarray3r4r@А!a*2:r;r@@@0@@@:9 @@г$unitHrIr@@ @@@;F@@@@@<I@@@,@@=LTr @@@Wr@ Same as {!iter}, but the function is applied to the index of the element as first argument, and the element itself as second argument. dseu;k@@@@@@@vN@@@=@@@@@@l#map!{wmq|wmt@б@б@А!a@JB@@3@6@Awmxwmz@@А!b@LB@A wm~wm@@@ @@B@@б@г̠&iarraywmwm@А!a'"wmwm@@@-@@@D) @@г᠐&iarraywmwm@А!b/7wmwm@@@5@@@F> @@@@@GA@@@4@@HDwmw@@@wmm@ [map f a] applies function [f] 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)) |]]. xzd@@@@@@@O@@'@*@@@@@@d$mapi"|fj|fn@б@б@гԠ#int |fr |fu@@ @@@M3        @:@A@@б@А!a@YB@N  |fy |f{@@А!b@[B@O |f !|f@@@ @@P@@@#@@Q &@@б@гX&iarray 1|f 2|f@А!a(0 8|f 9|f@@@.@@@S7 @@гm&iarray F|f G|f@А!b2E M|f N|f@@@8@@@UL @@@@@VO@@@4@@WR Z|fq@@@ ]|ff@ Same as {!map}, but the function is applied to the index of the element as first argument, and the element itself as second argument.  j} k/@@@@@@@ |P@@'@ C@@@@@@r)fold_left# 15 1>@б@б@А!a@fB@\3        @6@A 1B 1D@@б@А!b@hB@] 1H 1J@@А!a 1N 1P@@@@@^ @@@"@@_@@б@А!a(# 1U 1W@@б@г堐&iarray 1^ 1d@А!b+5 1[ 1]@@@1@@@a< @@А!aE@ 1h 1j@@@ J@@bE@@@M@@cH%@@@0@@dK 1A @@@ 11@' [fold_left f init a] computes [f (... (f (f init (get a 0)) (get a 1)) ...) (get a n-1)], where [n] is the length of the immutable array [a].  kk @@@@@@@ Q@@@7 Đ@@@@@@k-fold_left_map$   @б@б@А!a@xB@i3        @6@A   @@б@А!b@zB@j $ !&@@В@А!a ** +,@@@А!c@|B@k& 7/ 81@@@@2@@@l/@@@( @@m2# @@@:@@n53@@б@А!a@; L6 M8@@б@г ~&iarray W? XE@А!bCM ^< _>@@@I@@@pT @@В@А!aa\ mI nK@@@г &iarray xQ yW@А!cMn N P@@@S@@@ru @@@@@ @@s| @@@/ @@t2@@@@@uG@@@R@@v @@@ !@␠ s [fold_left_map] is a combination of {!fold_left} and {!map} that threads an accumulator through calls to [f].  XX @@@@@@@ R@@1@ @@@@@@*fold_right%  @б@б@А!b@B@}3        @6@A  @@б@А!a@B@~  @@А!a   @@@@@ @@@"@@@@б@г &iarray  @А!b2-  @@@8@@@4 @@б@А!a0:  @@А!a6@    @@@;;@@E @@@@@H@@@0@@K  @@@ @ c [fold_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].  '   (r@@@@@@@ 9S@@@ s @@@@@@k  = {1 Iterators on two arrays}  E F@@@@@@3 D C C D D D D D@}1@A%iter2& Q R@б@б@А!a@B@ ` a@@б@А!b@B@% m n@@г $unit v w@@ @@@4@@@@@7@@@'@@:" @@б@г &iarray  @А!a7J  @@@=@@@Q @@б@г ɠ&iarray   @А!bAa  @@@G@@@h @@г `$unit  @@ @@@u@@@@@x@@@.@@{1 @@@F@@~ @@@ @  [iter2 f a b] applies function [f] to all the elements of [a] and [b]. @raise Invalid_argument if the immutable arrays are not the same size.   @@@@@@@ T@@"@ " @@@@@@$map2'  @б@б@А!a@B@3        @6@A  @@б@А!b@B@  @@А!c@B@  @@@ @@@@@'@@" @@б@г N&iarray ' (@А!a72 . /@@@=@@@9 @@б@г e&iarray > ?@А!b?I E F@@@E@@@P @@г z&iarray S T@А!cI^ Z [@@@O@@@e @@@@@h@@@6@@k9@@@N@@n j@@@ m@ 9 [map2 f a b] applies function [f] 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))|]]. @raise Invalid_argument if the immutable arrays are not the same size.  z {4@@@@@@@ U@@*@  S@@@@@@  `4 {1 Array scanning}  77 7P@@@@@@3        @1@A'for_all( RV R]@б@б@А!a@B@ Ra Rc@@г v$bool Rg Rk@@ @@@'@@@@@*@@б@г &iarray Rs Ry@А!a': Rp Rr@@@-@@@A @@г $bool R} R@@ @@@N@@@@@Q@@@,@@T R` @@@ RR@ ; [for_all f [|a1; ...; an|]] checks if all elements of the immutable array satisfy the predicate [f]. That is, it returns [(f a1) && (f a2) && ... && (f an)].   ,@@@@@@@ V@@@ K ؐ@@@@@@t&exists) .2 .8@б@б@А!a@B@3 !   ! ! ! ! !@6@A '.< (.>@@г ꠐ$bool 0.B 1.F@@ @@@@@@@@@@б@г i&iarray B.N C.T@А!a)$ I.K J.M@@@/@@@+ @@г $bool W.X X.\@@ @@@8@@@@@;@@@,@@> c.; @@@ f..@ [exists f [|a1; ...; an|]] checks if at least one element of the immutable array satisfies the predicate [f]. That is, it returns [(f a1) || (f a2) || ... || (f an)].  s]] t@@@@@@@ W@@@  L@@@@@@^(for_all2*   @б@б@А!a@B@3        @u6@A $ &@@б@А!b@B@ * ,@@г k$bool 0 4@@ @@@@@@@@!@@@)@@$" @@б@г &iarray < B@А!a94 9 ;@@@?@@@; @@б@г &iarray I O@А!bAK F H@@@G@@@R @@г $bool S W@@ @@@_@@@@@b@@@.@@e1 @@@F@@h#@@@@ M Same as {!for_all}, but for a two-argument predicate. @raise Invalid_argument if the two immutable arrays have different lengths. XX@@@@@@@#X@@"@ ] ꐠ@@@@@@'exists2+()@б@б@А!a@B@332233333@6@A9:@@б@А!b@B@FG@@г $boolOP@@ @@@@@@@@!@@@)@@$" @@б@г &iarrayde@А!a94k l@@@?@@@; @@б@г &iarray{|"@А!bAK@@@G@@@R @@гJ$bool&*@@ @@@_@@@@@b@@@.@@e1 @@@F@@h@@@@ 될 Same as {!exists}, but for a two-argument predicate. @raise Invalid_argument if the two immutable arrays have different lengths. ++@@@@@@@Y@@"@ @@@@@@#mem,@б@А!a@B@3@4@A@@б@г&iarray@А!a@@@@@@ @@г$bool@@ @@@(@@@@@+@@@3@@., @@@@ L [mem a set] is true if and only if [a] is structurally equal to an element of [l] (i.e. there is an [x] in [l] such that [compare a x = 0]). ]w@@@@@@@"Z@@@ \鐠@@@@@@M$memq-'y}(y@б@А!a@B@30//00000@bs4@A6y7y@@б@гh&iarrayAyBy@А!aHyIy@@@@@@ @@г$boolVyWy@@ @@@(@@@@@+@@@3@@., @@@dyy@ j Same as {!mem}, but uses physical equality instead of structural equality to compare array elements. qr @@@@@@@[@@@ J@@@@@@M(find_opt.    @б@б@А!a@B@3@du6@A    @@г\$bool  #  '@@ @@@@@@@@@@б@г۠&iarray  /  5@А!a)$  ,  .@@@/@@@+ @@г$&option  <  B@А!a>9  9  ;@@@D@@@@ @@@@@C@@@4@@F  @@@  @) [find_opt f a] returns the first element of the immutable array [a] that satisfies the predicate [f], or [None] if there is no value that satisfies [f] in the array [a].  C C  @@@@@@@\@@'@9Ɛ@@@@@@f*find_index/ ! ! @б@б@А!a@ B@3@}6@A ! !@@гؠ$bool ! !@@ @@@@@@@@@@б@гW&iarray0 !!1 !'@А!a)$7 !8 ! @@@/@@@+ @@г&optionE !/F !5@г!#intO !+P !.@@ @@@B@@@@@@G @@@#@@J&@@@;@@ M` !@@@c  @ [find_index f a] returns [Some i], where [i] is the index of the first element of the array [a] that satisfies [f x], if there is such an element. It returns [None] if there is no such element. p!6!6q!" @@@@@@@]@@.@I@@@@@@m(find_map0" "" "@б@б@А!a@B@ 3@6@A" "" "@@г&option" "&" ",@А!b@B@ " "#" "%@@@ @@@@@@&@@!@@б@г砐&iarray" "4" ":@А!a61" "1" "3@@@<@@@8 @@г0&option" "A" "G@А!b4F" ">" "@@@@:@@@M @@@@@P@@@4@@S" "@@@" " @5 [find_map f a] applies [f] to the elements of [a] in order, and returns the first result of the form [Some v], or [None] if none exist. "H"H""@@@@@@@ ^@@'@EҐ@@@@@@s)find_mapi1""""@б@б@г#int""""@@ @@@3@:@A@@б@А!a@)B@ 0""1""@@г&option9"":"#@А!b@+B@"E""F""@@@ @@@)@@@$@@ ,@@@2@@!/5@@б@г&iarray["# \"#@А!a7?b"#c"# @@@=@@@#F @@гˠ&optionp"#q"#@А!b7Tw"#x"#@@@=@@@%[ @@@@@&^@@@4@@'a""@@@""@А Same as [find_map], but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument. ####@@@@@@@_@@'@m@@@@@@&z5 {1 Arrays of pairs} ####@@@@@@3@1@A%split2####@б@г&iarray###$@В@А!a@8B@,$####@@@А!b@:B@-1####@@@@@@@.:@@@- @@@0?##+@@В@г'&iarray#$ #$@А!a3R#$#$@@@9@@@2Y @@@г>&iarray#$#$@А!b=i#$#$@@@C@@@4p @@@@ @ @@5w%@@@? @@6z;@@@1##@z P [split [|(a1,b1); ...; (an,bn)|]] is [([|a1; ...; an|], [|b1; ...; bn|])]. >$$?$E$q@@@@@@@P`@@*@@@@@@@'combine3U$s$wV$s$~@б@г&iarray`$s$a$s$@А!a@GB@;3hgghhhhh@>@An$s$o$s$@@@ @@@= @@б@г&iarray~$s$$s$@А!b@IB@>$s$$s$@@@ @@@@%@@г&iarray$s$$s$@В@А!a<7$s$$s$@@@А!b&?$s$$s$@@@@K@/@@AH@@@# @@@CM$s$!@@@0@@DQ3$@@@O@@ETR'@@@$s$s*@ [combine [|a1; ...; an|] [|b1; ...; bn|]] is [[|(a1,b1); ...; (an,bn)|]]. Raise [Invalid_argument] if the two immutable arrays have different lengths. $$%B%Q@@@@@@@a@@:@@@@@@@sa- {1 Sorting} %S%S%S%e@@@@@@3@1@A$sort4%g%k%g%o@б@б@А!a@UB@J%g%s %g%u@@б@А!a  %g%y%g%{@@г렐#int%g%%g%@@ @@@K/@@@@@L2@@@"@@M5 @@б@гU&iarray.%g%/%g%@А!a2E5%g%6%g%@@@8@@@OL @@гj&iarrayC%g%D%g%@А!aGZJ%g%K%g%@@@M@@@Qa @@@@@Rd@@@4@@SgW%g%r@@@Z%g%g@  Sort an immutable array in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, {!Stdlib.compare} is a suitable comparison function. The result of calling [sort] is a fresh immutable array containing the same elements as the original sorted in increasing order. Other than this fresh array, [sort] is guaranteed to run in constant heap space and (at most) logarithmic stack space. The current implementation uses Heap Sort. It runs in constant stack space. Specification of the comparison function: Let [a] be the immutable array and [cmp] the comparison function. The following must be true for all [x], [y], [z] in [a] : - [cmp x y] > 0 if and only if [cmp y x] < 0 - if [cmp x y] >= 0 and [cmp y z] >= 0 then [cmp x z] >= 0 The result of [sort], 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 [a] (or equivalently, of [a']): - [cmp (get a' i) (get a' j)] >= 0 if and only if i >= j g%%h*x*z@@@@@@@yb@@'@@@@@@@@+stable_sort5~*|**|*@б@б@А!a@aB@V3@6@A*|**|*@@б@А!a *|**|*@@гr#int*|**|*@@ @@@W@@@!@@X@@@$@@Y @@б@гܠ&iarray*|**|*@А!a4/*|**|*@@@:@@@[6 @@г&iarray*|**|*@А!aID*|**|*@@@O@@@]K @@@@@^N@@@4@@_Q*|*@@@*|*|@*  Same as {!sort}, 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. The current implementation uses Merge Sort. It uses a temporary array of length [n/2], where [n] is the length of the immutable array. It is usually faster than the current implementation of {!sort}. **,B,D@@@@@@@c@@'@:ǐ@@@@@@q)fast_sort6,F,J,F,S@б@б@А!a@mB@b3@6@A,F,W,F,Y@@б@А!a ,F,],F,_@@г#int',F,c(,F,f@@ @@@c@@@!@@d@@@$@@e @@б@гc&iarray<,F,n=,F,t@А!a4/C,F,kD,F,m@@@:@@@g6 @@гx&iarrayQ,F,{R,F,@А!aIDX,F,xY,F,z@@@O@@@iK @@@@@jN@@@4@@kQe,F,V@@@h,F,F@ N Same as {!sort} or {!stable_sort}, whichever is faster on typical input. u ,,v ,,@@@@@@@d@@'@N@@@@@@q[/ {1 Iterators}  ,, ,,@@@@@@3@1@A&to_seqv,,,,@б@гѠ&iarray,,,-@А!a@ B@n ,,,,@@@ @@@p'@@г#Seq!t,- ,- @ ,-,-@@А!a#>,-,- @@@)@@@ E@@@%@@ H(@@@,,@) 6 Iterate on the immutable array, in increasing order. ----K@@@@@@@e@@$@9Ɛ@@@@@@g'to_seqiw-M-Q-M-X@б@г6&iarray-M-^-M-d@А!a@ B@ 3@>@A-M-[-M-]@@@ @@@  @@г/#Seq!t/-M-s0-M-v@ 3-M-w4-M-x@@В@г#intB-M-iC-M-l@@ @@@ -@@@А!a83N-M-oO-M-q@@@@@A@@ <@@@3 @@@ A\-M-h)@@@@@@ EC,@@@b-M-M/@ [ Iterate on the immutable array, in increasing order, yielding indices along elements. o-y-yp--@@@@@@@f@@?@H@@@@@@d&of_seqx----@б@г#Seq!t----@ ----@@А!a@ B@ 3@G@A----@@@  @@@  @@гݠ&iarray----@А!a----@@@"@@@  @@@@@ !@@@--@ . Create an immutable array from the generator ---.1@@@@@@@g@@#@"@@@@@@@h"/*.3.3.3.:@@@@@@3@Rv1@A{ϐ< {1 Undocumented functions} .<.<.<.]@@@@@@*unsafe_gety....@б@гC&iarray....@А!a@ B@ 1(..)..@@@ @@@ 8@@б@г #int8..9..@@ @@@ G@@А!aKB..C..@@@ $@@ P@@@@@ S"@@1%array_unsafe_getBA@@@@Q..R..@@ch@@@@`@A@`,@@M@-@l@L@@j.@@e@2@&@@@  @  @  @ ~ @  f@ 3 @  @  @ t "@ @f@@k,@ @1@@@i@I@D@$@:@@D@$@^@@3@`@A@ H************************************************************************A@@A@L@ H BMMBM@ H OCaml CC@ H DD3@ H Xavier Leroy, projet Cristal, INRIA Rocquencourt E44E4@ H Antal Spector-Zabusky, Jane Street, New York FF@ H GG@ H Copyright 1996 Institut National de Recherche en Informatique et HHg@ H en Automatique. IhhIh@ H Copyright 2023 Jane Street Group LLC JJ@ H KKN@ H All rights reserved. This file is distributed under the terms of LOOLO@ H the GNU Lesser General Public License version 2.1, with the MM@ H special exception on linking described in the file LICENSE. NN5@ H O66O6@ H************************************************************************P P@ * Operations on immutable arrays. This module mirrors the API of [Array], 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. @since 5.4  -* An alias for the type of immutable arrays. K G* Return the length (number of elements) of the given immutable array. Ѡ * [get a n] returns the element number [n] of immutable array [a]. The first element has number 0. The last element has number [length a - 1]. @raise Invalid_argument if [n] is outside the range 0 to [(length a - 1)]. l * [init n f] returns a fresh immutable array of length [n], with element number [i] initialized to the result of [f i]. In other terms, [init n f] tabulates the results of [f] applied to the integers [0] to [n-1]. @raise Invalid_argument if [n < 0] or [n > Sys.max_array_length]. If the return type of [f] is [float], then the maximum size is only [Sys.max_array_length / 2].  * [append v1 v2] returns a fresh immutable array containing the concatenation of the immutable arrays [v1] and [v2]. @raise Invalid_argument if [length v1 + length v2 > Sys.max_array_length].  B* Same as {!append}, but concatenates a list of immutable arrays.  * [sub a ~pos ~len] returns a fresh immutable array of length [len], containing the elements number [pos] to [pos + len - 1] of immutable array [a]. This creates a copy of the selected portion of the immutable array. @raise Invalid_argument if [pos] and [len] do not designate a valid subarray of [a]; that is, if [pos < 0], or [len < 0], or [pos + len > length a].  ;* [to_list a] returns the list of all the elements of [a]. ; * [of_list l] returns a fresh immutable array containing the elements of [l]. @raise Invalid_argument if the length of [l] is greater than [Sys.max_array_length]. ࠠ ,* {1 Converting to and from mutable arrays} Š * [to_array a] returns a mutable copy of the immutable array [a]; that is, a fresh (mutable) array containing the same elements as [a] w * [of_array ma] returns an immutable copy of the mutable array [ma]; that is, a fresh immutable array containing the same elements as [ma] 1* {1 Comparison}  * [eq [|a1; ...; an|] [|b1; ..; bm|]] 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]. x * Provided the function [cmp] defines a preorder on elements, [compare cmp a b] compares first [a] and [b] by their length, and then, if equal, by their elements according to the lexicographic preorder. For more details on comparison functions, see {!Iarray.sort}. ⠠0* {1 Iterators} Ǡ * [iter f a] 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)); ()]. c * Same as {!iter}, but the function is applied to the index of the element as first argument, and the element itself as second argument. ࠠ * [map f a] applies function [f] 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)) |]]. i * Same as {!map}, but the function is applied to the index of the element as first argument, and the element itself as second argument.  ࠠ * [fold_left f init a] computes [f (... (f (f init (get a 0)) (get a 1)) ...) (get a n-1)], where [n] is the length of the immutable array [a].  b t* [fold_left_map] is a combination of {!fold_left} and {!map} that threads an accumulator through calls to [f].  * [fold_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].  ,>* {1 Iterators on two arrays}   * [iter2 f a b] applies function [f] to all the elements of [a] and [b]. @raise Invalid_argument if the immutable arrays are not the same size.  :* [map2 f a b] applies function [f] 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))|]]. @raise Invalid_argument if the immutable arrays are not the same size.  ⠠5* {1 Array scanning}  Ǡ * [for_all f [|a1; ...; an|]] checks if all elements of the immutable array satisfy the predicate [f]. That is, it returns [(f a1) && (f a2) && ... && (f an)].  c * [exists f [|a1; ...; an|]] checks if at least one element of the immutable array satisfies the predicate [f]. That is, it returns [(f a1) || (f a2) || ... || (f an)].  * Same as {!for_all}, but for a two-argument predicate. @raise Invalid_argument if the two immutable arrays have different lengths.  W * Same as {!exists}, but for a two-argument predicate. @raise Invalid_argument if the two immutable arrays have different lengths.  * [mem a set] is true if and only if [a] is structurally equal to an element of [l] (i.e. there is an [x] in [l] such that [compare a x = 0]). ^ k* Same as {!mem}, but uses physical equality instead of structural equality to compare array elements.  * [find_opt f a] returns the first element of the immutable array [a] that satisfies the predicate [f], or [None] if there is no value that satisfies [f] in the array [a].  * [find_index f a] returns [Some i], where [i] is the index of the first element of the array [a] that satisfies [f x], if there is such an element. It returns [None] if there is no such element.  * [find_map f a] applies [f] to the elements of [a] in order, and returns the first result of the form [Some v], or [None] if none exist.  * Same as [find_map], but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument. 頠6* {1 Arrays of pairs} Π Q* [split [|(a1,b1); ...; (an,bn)|]] is [([|a1; ...; an|], [|b1; ...; bn|])]. E * [combine [|a1; ...; an|] [|b1; ...; bn|]] is [[|(a1,b1); ...; (an,bn)|]]. Raise [Invalid_argument] if the two immutable arrays have different lengths. .* {1 Sorting}  * Sort an immutable array in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, {!Stdlib.compare} is a suitable comparison function. The result of calling [sort] is a fresh immutable array containing the same elements as the original sorted in increasing order. Other than this fresh array, [sort] is guaranteed to run in constant heap space and (at most) logarithmic stack space. The current implementation uses Heap Sort. It runs in constant stack space. Specification of the comparison function: Let [a] be the immutable array and [cmp] the comparison function. The following must be true for all [x], [y], [z] in [a] : - [cmp x y] > 0 if and only if [cmp y x] < 0 - if [cmp x y] >= 0 and [cmp y z] >= 0 then [cmp x z] >= 0 The result of [sort], 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 [a] (or equivalently, of [a']): - [cmp (get a' i) (get a' j)] >= 0 if and only if i >= j % * Same as {!sort}, 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. The current implementation uses Merge Sort. It uses a temporary array of length [n/2], where [n] is the length of the immutable array. It is usually faster than the current implementation of {!sort}.  O* Same as {!sort} or {!stable_sort}, whichever is faster on typical input. 0* {1 Iterators}  7* Iterate on the immutable array, in increasing order.  \* Iterate on the immutable array, in increasing order, yielding indices along elements. , /* Create an immutable array from the generator Ƞ#*/*=* {1 Undocumented functions}  = The following is for system use only. Do not call directly. ._._._.@@?)../ocamlc0-strict-sequence(-absname"-w5+a-4-9-41-42-44-45-48"-g+-warn-error"+A*-bin-annot)-nostdlib*-principal"-o2stdlib__Iarray.cmi"-c Q/home/ci/builds/workspace/precheck/flambda/false/label/ocaml-ubuntu-latest/stdlib @@013OuQ3@@@8CamlinternalFormatBasics0%FU(Q/Tu&Stdlib0Lku]8_٠.Stdlib__Either0Vy`u~c à0.Au˸_+Stdlib__Seq0nwzG&amg@0.Au˸_Ai]͐   *@Js@@Ӑ"@ x ݰ  @ w &@ [a@@ L @G@ [@@^@K@@@@  1@@@j@@,@=@@̐@@&[@6@ܐ+@ ( @q p@@P@@