sig
type ('a, 'b) t constraint 'b = [< `Read | `Write ]
external length : ('a, [< `Read | `Write ]) BatArray.Cap.t -> int
= "%array_length"
external get :
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> int -> 'a
= "%array_safe_get"
external set :
('a, [< `Read | `Write > `Write ]) BatArray.Cap.t -> int -> 'a -> unit
= "%array_safe_set"
external make : int -> 'a -> ('a, [< `Read | `Write ]) BatArray.Cap.t
= "caml_make_vect"
external create : int -> 'a -> ('a, [< `Read | `Write ]) BatArray.Cap.t
= "caml_make_vect"
external make_float : int -> (float, [< `Read | `Write ]) BatArray.Cap.t
= "caml_make_float_vect"
external of_array : 'a array -> ('a, [< `Read | `Write ]) BatArray.Cap.t
= "%identity"
external to_array : ('a, [ `Read | `Write ]) BatArray.Cap.t -> 'a array
= "%identity"
external read_only :
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('a, [ `Read ]) BatArray.Cap.t = "%identity"
external write_only :
('a, [< `Read | `Write > `Write ]) BatArray.Cap.t ->
('a, [ `Write ]) BatArray.Cap.t = "%identity"
val init : int -> (int -> 'a) -> ('a, [< `Read | `Write ]) BatArray.Cap.t
val make_matrix :
int ->
int ->
'a ->
(('a, [< `Read | `Write ]) BatArray.Cap.t, [< `Read | `Write ])
BatArray.Cap.t
val create_matrix :
int ->
int ->
'a ->
(('a, [< `Read | `Write ]) BatArray.Cap.t, [< `Read | `Write ])
BatArray.Cap.t
val iter :
('a -> unit) -> ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> unit
val map :
('a -> 'b) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('b, [< `Read | `Write ]) BatArray.Cap.t
val iteri :
(int -> 'a -> unit) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> unit
val mapi :
(int -> 'a -> 'b) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('b, [< `Read | `Write ]) BatArray.Cap.t
val modify : ('a -> 'a) -> ('a, [ `Read | `Write ]) BatArray.Cap.t -> unit
val modifyi :
(int -> 'a -> 'a) -> ('a, [ `Read | `Write ]) BatArray.Cap.t -> unit
val fold_left :
('a -> 'b -> 'a) ->
'a -> ('b, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'a
val fold :
('a -> 'b -> 'a) ->
'a -> ('b, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'a
val fold_right :
('b -> 'a -> 'a) ->
('b, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'a -> 'a
val fold_while :
('acc -> 'a -> bool) ->
('acc -> 'a -> 'acc) ->
'acc -> ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'acc * int
val iter2 :
('a -> 'b -> unit) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('b, [< `Read | `Write > `Read ]) BatArray.Cap.t -> unit
val iter2i :
(int -> 'a -> 'b -> unit) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('b, [< `Read | `Write > `Read ]) BatArray.Cap.t -> unit
val for_all :
('a -> bool) -> ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> bool
val exists :
('a -> bool) -> ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> bool
val find :
('a -> bool) -> ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'a
val mem : 'a -> ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> bool
val memq : 'a -> ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> bool
val findi :
('a -> bool) -> ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> int
val filter :
('a -> bool) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('a, [< `Read | `Write ]) BatArray.Cap.t
val filter_map :
('a -> 'b option) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('b, [< `Read | `Write ]) BatArray.Cap.t
val count_matching :
('a -> bool) -> ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> int
val find_all :
('a -> bool) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('a, [< `Read | `Write ]) BatArray.Cap.t
val partition :
('a -> bool) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('a, [< `Read | `Write ]) BatArray.Cap.t *
('a, [< `Read | `Write ]) BatArray.Cap.t
val rev :
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('a, [< `Read | `Write ]) BatArray.Cap.t
val rev_in_place : ('a, [ `Read | `Write ]) BatArray.Cap.t -> unit
val append :
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('a, [< `Read | `Write ]) BatArray.Cap.t
val concat :
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t list ->
('a, [< `Read | `Write ]) BatArray.Cap.t
val sub :
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
int -> int -> ('a, [< `Read | `Write ]) BatArray.Cap.t
val copy : ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'a array
val fill :
('a, [< `Read | `Write > `Write ]) BatArray.Cap.t ->
int -> int -> 'a -> unit
val blit :
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
int ->
('a, [< `Read | `Write > `Write ]) BatArray.Cap.t -> int -> int -> unit
val enum : ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'a BatEnum.t
val of_enum : 'a BatEnum.t -> ('a, [< `Read | `Write ]) BatArray.Cap.t
val backwards :
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'a BatEnum.t
val of_backwards : 'a BatEnum.t -> ('a, [< `Read | `Write ]) BatArray.Cap.t
val to_list : ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'a list
val split :
('a * 'b, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('a, [< `Read | `Write ]) BatArray.Cap.t *
('b, [< `Read | `Write ]) BatArray.Cap.t
val pivot_split :
'a BatOrd.ord ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'a -> int * int
val of_list : 'a list -> ('a, [< `Read | `Write ]) BatArray.Cap.t
val sort :
('a -> 'a -> int) -> ('a, [ `Read | `Write ]) BatArray.Cap.t -> unit
val stable_sort :
('a -> 'a -> int) -> ('a, [ `Read | `Write ]) BatArray.Cap.t -> unit
val fast_sort :
('a -> 'a -> int) -> ('a, [ `Read | `Write ]) BatArray.Cap.t -> unit
val print :
?first:string ->
?last:string ->
?sep:string ->
('a BatIO.output -> 'b -> unit) ->
'a BatIO.output ->
('b, [< `Read | `Write > `Read ]) BatArray.Cap.t -> unit
val compare :
'a BatOrd.comp ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t BatOrd.comp
val ord :
'a BatOrd.ord ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t BatOrd.ord
val equal :
'a BatOrd.eq ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t BatOrd.eq
module Exceptionless :
sig
val find :
('a -> bool) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'a option
val findi :
('a -> bool) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> int option
end
module Labels :
sig
val init :
int -> f:(int -> 'a) -> ('a, [< `Read | `Write ]) BatArray.Cap.t
val make : int -> init:'a -> ('a, [< `Read | `Write ]) BatArray.Cap.t
val create : int -> init:'a -> ('a, [< `Read | `Write ]) BatArray.Cap.t
val make_matrix :
dimx:int ->
dimy:int ->
'a ->
(('a, [< `Read | `Write ]) BatArray.Cap.t, [< `Read | `Write ])
BatArray.Cap.t
val create_matrix :
dimx:int ->
dimy:int ->
'a ->
(('a, [< `Read | `Write ]) BatArray.Cap.t, [< `Read | `Write ])
BatArray.Cap.t
val sub :
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
pos:int -> len:int -> ('a, [< `Read | `Write ]) BatArray.Cap.t
val fill :
('a, [< `Read | `Write > `Write ]) BatArray.Cap.t ->
pos:int -> len:int -> 'a -> unit
val blit :
src:('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
src_pos:int ->
dst:('a, [< `Read | `Write > `Write ]) BatArray.Cap.t ->
dst_pos:int -> len:int -> unit
val iter :
f:('a -> unit) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> unit
val iteri :
f:(int -> 'a -> unit) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> unit
val modify :
f:('a -> 'a) -> ('a, [ `Read | `Write ]) BatArray.Cap.t -> unit
val modifyi :
f:(int -> 'a -> 'a) ->
('a, [ `Read | `Write ]) BatArray.Cap.t -> unit
val fold_left :
f:('a -> 'b -> 'a) ->
init:'a -> ('b, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'a
val fold :
f:('a -> 'b -> 'a) ->
init:'a -> ('b, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'a
val fold_right :
f:('b -> 'a -> 'a) ->
('b, [< `Read | `Write > `Read ]) BatArray.Cap.t -> init:'a -> 'a
val fold_while :
p:('acc -> 'a -> bool) ->
f:('acc -> 'a -> 'acc) -> init:'acc -> 'a array -> 'acc * int
val sort :
cmp:('a -> 'a -> int) ->
('a, [ `Read | `Write ]) BatArray.Cap.t -> unit
val stable_sort :
cmp:('a -> 'a -> int) ->
('a, [ `Read | `Write ]) BatArray.Cap.t -> unit
val fast_sort :
cmp:('a -> 'a -> int) ->
('a, [ `Read | `Write ]) BatArray.Cap.t -> unit
val iter2 :
f:('a -> 'b -> unit) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('b, [< `Read | `Write > `Read ]) BatArray.Cap.t -> unit
val iter2i :
f:(int -> 'a -> 'b -> unit) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('b, [< `Read | `Write > `Read ]) BatArray.Cap.t -> unit
val exists :
f:('a -> bool) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> bool
val for_all :
f:('a -> bool) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> bool
val find :
f:('a -> bool) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'a
val map :
f:('a -> 'b) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('b, [< `Read | `Write ]) BatArray.Cap.t
val mapi :
f:(int -> 'a -> 'b) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('b, [< `Read | `Write ]) BatArray.Cap.t
val filter :
f:('a -> bool) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('a, [< `Read | `Write ]) BatArray.Cap.t
val filter_map :
f:('a -> 'b option) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
('b, [< `Read | `Write ]) BatArray.Cap.t
val count_matching :
f:('a -> bool) ->
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> int
end
external unsafe_get :
('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> int -> 'a
= "%array_unsafe_get"
external unsafe_set :
('a, [< `Read | `Write > `Write ]) BatArray.Cap.t -> int -> 'a -> unit
= "%array_unsafe_set"
end