module Array:sig
..end
val fold_lefti : (int -> 'a -> 'b -> 'a) -> 'a -> 'b array -> 'a
val fold_righti : (int -> 'a -> 'b -> 'b) -> 'a array -> 'b -> 'b
val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b array -> 'c array -> 'a
val iter2 : ('a -> 'b -> 'c) -> 'a array -> 'b array -> unit
val map2 : ('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array
val init_matrix : int -> int -> (int -> int -> 'a) -> 'a array array
val matrix_of_list_list : 'a list list -> 'a array array
val nb_distinct : 'a array -> int
val binary : int -> int -> bool array
binary len n
is base 2 representation of n
, truncated to length len
.
n
= $\sum (binary n).(i)
2i$
val extremum : ('a -> 'a -> bool) -> 'a array -> 'a
extremum (>) list
gives the max of the list.val swap : 'a array -> int -> int -> unit
swap a i j
modify the array a
in place, swapping elements at indexes i
and j
.val shuffle : ?prng:Random.State.t -> 'a array -> unit
val down_init : int -> (int -> 'a) -> 'a array
Array.init
, but begins the initialisation at the end of the array.val cart : 'a array -> 'b array -> ('a * 'b) array array
val (*$) : 'a array -> 'b array -> ('a * 'b) array array
cart
.val interval : int -> int -> int array
val (-|) : int -> int -> int array
interval
.