sig
type 'a printer = Format.formatter -> 'a -> unit
type 'a sequence = ('a -> unit) -> unit
type 'a or_error = [ `Error of string | `Ok of 'a ]
type random = Random.State.t
type json =
[ `Assoc of (string * CCArray1.json) list
| `Bool of bool
| `Float of float
| `Int of int
| `List of CCArray1.json list
| `Null
| `String of string ]
type 'a to_json = 'a -> CCArray1.json
type 'a of_json = CCArray1.json -> 'a CCArray1.or_error
type ('a, 'b, 'c) t constraint 'c = [< `R | `W ]
type ('a, 'b, 'c) array_ = ('a, 'b, 'c) CCArray1.t
constraint 'c = [< `R | `W ]
exception WrongDimension
val make :
?x:'a ->
kind:('a, 'b) Bigarray.kind -> int -> ('a, 'b, [< `R | `W ]) CCArray1.t
val make_int : int -> (int, Bigarray.int_elt, [< `R | `W ]) CCArray1.t
val make_char :
int -> (char, Bigarray.int8_unsigned_elt, [< `R | `W ]) CCArray1.t
val make_int8s :
int -> (int, Bigarray.int8_signed_elt, [< `R | `W ]) CCArray1.t
val make_int8u :
int -> (int, Bigarray.int8_unsigned_elt, [< `R | `W ]) CCArray1.t
val make_int16s :
int -> (int, Bigarray.int16_signed_elt, [< `R | `W ]) CCArray1.t
val make_int16u :
int -> (int, Bigarray.int16_unsigned_elt, [< `R | `W ]) CCArray1.t
val make_int32 :
int -> (int32, Bigarray.int32_elt, [< `R | `W ]) CCArray1.t
val make_int64 :
int -> (int64, Bigarray.int64_elt, [< `R | `W ]) CCArray1.t
val make_native :
int -> (nativeint, Bigarray.nativeint_elt, [< `R | `W ]) CCArray1.t
val make_float32 :
int -> (float, Bigarray.float32_elt, [< `R | `W ]) CCArray1.t
val make_float64 :
int -> (float, Bigarray.float64_elt, [< `R | `W ]) CCArray1.t
val make_complex32 :
int -> (Complex.t, Bigarray.complex32_elt, [< `R | `W ]) CCArray1.t
val make_complex64 :
int -> (Complex.t, Bigarray.complex64_elt, [< `R | `W ]) CCArray1.t
val init :
kind:('a, 'b) Bigarray.kind ->
f:(int -> 'a) -> int -> ('a, 'b, [< `R | `W ]) CCArray1.t
val of_bigarray :
('a, 'b, Bigarray.c_layout) Bigarray.Array1.t ->
('a, 'b, [< `R | `W ]) CCArray1.t
val to_bigarray :
('a, 'b, [ `R | `W ]) CCArray1.t ->
('a, 'b, Bigarray.c_layout) Bigarray.Array1.t
val ro :
('a, 'b, [< `R | `W > `R ]) CCArray1.t -> ('a, 'b, [ `R ]) CCArray1.t
val wo :
('a, 'b, [< `R | `W > `W ]) CCArray1.t -> ('a, 'b, [ `W ]) CCArray1.t
val length : ('a, 'b, [< `R | `W > `R ]) CCArray1.t -> int
val set : ('a, 'b, [< `R | `W > `W ]) CCArray1.t -> int -> 'a -> unit
val get : ('a, 'b, [< `R | `W > `R ]) CCArray1.t -> int -> 'a
val fill : ('a, 'b, [< `R | `W > `W ]) CCArray1.t -> 'a -> unit
val sub :
('a, 'b, [< `R | `W ] as 'c) CCArray1.t ->
int -> int -> ('a, 'b, 'c) CCArray1.t
val blit :
('a, 'b, [< `R | `W > `R ]) CCArray1.t ->
('a, 'b, [< `R | `W > `W ]) CCArray1.t -> unit
val copy :
('a, 'b, [< `R | `W > `R ]) CCArray1.t ->
('a, 'b, [< `R | `W ]) CCArray1.t
val iter : f:('a -> unit) -> ('a, 'b, [< `R | `W > `R ]) CCArray1.t -> unit
val iteri :
f:(int -> 'a -> unit) -> ('a, 'b, [< `R | `W > `R ]) CCArray1.t -> unit
val foldi :
('b -> int -> 'a -> 'b) ->
'b -> ('a, 'c, [< `R | `W > `R ]) CCArray1.t -> 'b
val for_all :
f:('a -> bool) -> ('a, 'b, [< `R | `W > `R ]) CCArray1.t -> bool
val exists :
f:('a -> bool) -> ('a, 'b, [< `R | `W > `R ]) CCArray1.t -> bool
val pp :
'a CCArray1.printer ->
('a, 'b, [< `R | `W > `R ]) CCArray1.t CCArray1.printer
module Bool :
sig
type ('b, 'a) t = (int, 'b, 'a) CCArray1.array_
constraint 'a = [< `R | `W ]
val get : ('a, [< `R | `W > `R ]) CCArray1.Bool.t -> int -> bool
val set :
('a, [< `R | `W > `W ]) CCArray1.Bool.t -> int -> bool -> unit
val zeroes :
int -> (Bigarray.int8_unsigned_elt, [< `R | `W ]) CCArray1.Bool.t
val ones :
int -> (Bigarray.int8_unsigned_elt, [< `R | `W ]) CCArray1.Bool.t
val iter_zeroes :
f:(int -> unit) -> ('a, [< `R | `W > `R ]) CCArray1.Bool.t -> unit
val iter_ones :
f:(int -> unit) -> ('a, [< `R | `W > `R ]) CCArray1.Bool.t -> unit
val cardinal : ('a, [< `R | `W > `R ]) CCArray1.Bool.t -> int
val pp : ('a, [< `R | `W > `R ]) CCArray1.Bool.t CCArray1.printer
val or_ :
?res:('b, [< `R | `W > `W ] as 'a) CCArray1.Bool.t ->
('b, [< `R | `W > `R ]) CCArray1.Bool.t ->
('b, [< `R | `W > `R ]) CCArray1.Bool.t -> ('b, 'a) CCArray1.Bool.t
val and_ :
?res:('b, [< `R | `W > `W ] as 'a) CCArray1.Bool.t ->
('b, [< `R | `W > `R ]) CCArray1.Bool.t ->
('b, [< `R | `W > `R ]) CCArray1.Bool.t -> ('b, 'a) CCArray1.Bool.t
val not_ :
?res:('b, [< `R | `W > `W ] as 'a) CCArray1.Bool.t ->
('b, [< `R | `W > `R ]) CCArray1.Bool.t -> ('b, 'a) CCArray1.Bool.t
val mix :
?res:('b, [< `R | `W > `W ] as 'a) CCArray1.Bool.t ->
('b, [< `R | `W > `R ]) CCArray1.Bool.t ->
('b, [< `R | `W > `R ]) CCArray1.Bool.t -> ('b, 'a) CCArray1.Bool.t
val convolution :
?res:('b, [< `R | `W > `W ] as 'a) CCArray1.Bool.t ->
('b, [< `R | `W > `R ]) CCArray1.Bool.t ->
by:('b, [< `R | `W > `R ]) CCArray1.Bool.t ->
('b, 'a) CCArray1.Bool.t
end
val map :
?res:('a, 'b, [< `R | `W > `W ] as 'c) CCArray1.t ->
f:('a -> 'a) ->
('a, 'b, [< `R | `W > `R ]) CCArray1.t -> ('a, 'b, 'c) CCArray1.t
val map2 :
?res:('a, 'b, [< `R | `W > `W ] as 'c) CCArray1.t ->
f:('a -> 'a2 -> 'a) ->
('a, 'b, [< `R | `W > `R ]) CCArray1.t ->
('a2, 'd, [< `R | `W > `R ]) CCArray1.t -> ('a, 'b, 'c) CCArray1.t
val append :
?res:('a, 'b, [< `R | `W > `W ] as 'c) CCArray1.t ->
('a, 'b, [< `R | `W > `R ]) CCArray1.t ->
('a, 'b, [< `R | `W > `R ]) CCArray1.t -> ('a, 'b, 'c) CCArray1.t
val filter :
?res:(Bigarray.int8_unsigned_elt, [< `R | `W > `W ] as 'c)
CCArray1.Bool.t ->
f:('a -> bool) ->
('a, 'b, [< `R | `W > `R ]) CCArray1.t ->
(Bigarray.int8_unsigned_elt, 'c) CCArray1.Bool.t
module type S =
sig
type elt
type ('a, 'b) t = (CCArray1.S.elt, 'a, 'b) CCArray1.array_
constraint 'b = [< `R | `W ]
val add :
?res:('a, [< `R | `W > `W ] as 'b) CCArray1.S.t ->
('a, [< `R | `W > `R ]) CCArray1.S.t ->
('a, [< `R | `W > `R ]) CCArray1.S.t -> ('a, 'b) CCArray1.S.t
val mult :
?res:('a, [< `R | `W > `W ] as 'b) CCArray1.S.t ->
('a, [< `R | `W > `R ]) CCArray1.S.t ->
('a, [< `R | `W > `R ]) CCArray1.S.t -> ('a, 'b) CCArray1.S.t
val scalar_add :
?res:('a, [< `R | `W > `W ] as 'b) CCArray1.S.t ->
('a, [< `R | `W > `R ]) CCArray1.S.t ->
x:CCArray1.S.elt -> ('a, 'b) CCArray1.S.t
val scalar_mult :
?res:('a, [< `R | `W > `W ] as 'b) CCArray1.S.t ->
('a, [< `R | `W > `R ]) CCArray1.S.t ->
x:CCArray1.S.elt -> ('a, 'b) CCArray1.S.t
val sum_elt : ('a, [< `R | `W > `R ]) CCArray1.S.t -> CCArray1.S.elt
val product_elt :
('a, [< `R | `W > `R ]) CCArray1.S.t -> CCArray1.S.elt
val dot_product :
('a, [< `R | `W > `R ]) CCArray1.S.t ->
('b, [< `R | `W > `R ]) CCArray1.S.t -> CCArray1.S.elt
module Infix :
sig
val ( * ) :
('a, [< `R | `W > `R ]) CCArray1.S.t ->
('a, [< `R | `W > `R ]) CCArray1.S.t ->
('a, [< `R | `W ]) CCArray1.S.t
val ( + ) :
('a, [< `R | `W > `R ]) CCArray1.S.t ->
('b, [< `R | `W > `R ]) CCArray1.S.t ->
('a, [< `R | `W ]) CCArray1.S.t
val ( *! ) :
('a, [< `R | `W > `R ]) CCArray1.S.t ->
CCArray1.S.elt -> ('a, [< `R | `W ]) CCArray1.S.t
val ( +! ) :
('a, [< `R | `W > `R ]) CCArray1.S.t ->
CCArray1.S.elt -> ('a, [< `R | `W ]) CCArray1.S.t
end
val ( * ) :
('a, [< `R | `W > `R ]) t ->
('a, [< `R | `W > `R ]) t -> ('a, [< `R | `W ]) t
val ( + ) :
('a, [< `R | `W > `R ]) t ->
('b, [< `R | `W > `R ]) t -> ('a, [< `R | `W ]) t
val ( *! ) : ('a, [< `R | `W > `R ]) t -> elt -> ('a, [< `R | `W ]) t
val ( +! ) : ('a, [< `R | `W > `R ]) t -> elt -> ('a, [< `R | `W ]) t
end
module Int :
sig
type elt = int
type ('a, 'b) t = (elt, 'a, 'b) array_ constraint 'b = [< `R | `W ]
val add :
?res:('a, [< `R | `W > `W ] as 'b) t ->
('a, [< `R | `W > `R ]) t -> ('a, [< `R | `W > `R ]) t -> ('a, 'b) t
val mult :
?res:('a, [< `R | `W > `W ] as 'b) t ->
('a, [< `R | `W > `R ]) t -> ('a, [< `R | `W > `R ]) t -> ('a, 'b) t
val scalar_add :
?res:('a, [< `R | `W > `W ] as 'b) t ->
('a, [< `R | `W > `R ]) t -> x:elt -> ('a, 'b) t
val scalar_mult :
?res:('a, [< `R | `W > `W ] as 'b) t ->
('a, [< `R | `W > `R ]) t -> x:elt -> ('a, 'b) t
val sum_elt : ('a, [< `R | `W > `R ]) t -> elt
val product_elt : ('a, [< `R | `W > `R ]) t -> elt
val dot_product :
('a, [< `R | `W > `R ]) t -> ('b, [< `R | `W > `R ]) t -> elt
module Infix :
sig
val ( * ) :
('a, [< `R | `W > `R ]) t ->
('a, [< `R | `W > `R ]) t -> ('a, [< `R | `W ]) t
val ( + ) :
('a, [< `R | `W > `R ]) t ->
('b, [< `R | `W > `R ]) t -> ('a, [< `R | `W ]) t
val ( *! ) :
('a, [< `R | `W > `R ]) t -> elt -> ('a, [< `R | `W ]) t
val ( +! ) :
('a, [< `R | `W > `R ]) t -> elt -> ('a, [< `R | `W ]) t
end
val ( * ) :
('a, [< `R | `W > `R ]) t ->
('a, [< `R | `W > `R ]) t -> ('a, [< `R | `W ]) t
val ( + ) :
('a, [< `R | `W > `R ]) t ->
('b, [< `R | `W > `R ]) t -> ('a, [< `R | `W ]) t
val ( *! ) : ('a, [< `R | `W > `R ]) t -> elt -> ('a, [< `R | `W ]) t
val ( +! ) : ('a, [< `R | `W > `R ]) t -> elt -> ('a, [< `R | `W ]) t
end
module Float :
sig
type elt = float
type ('a, 'b) t = (elt, 'a, 'b) array_ constraint 'b = [< `R | `W ]
val add :
?res:('a, [< `R | `W > `W ] as 'b) t ->
('a, [< `R | `W > `R ]) t -> ('a, [< `R | `W > `R ]) t -> ('a, 'b) t
val mult :
?res:('a, [< `R | `W > `W ] as 'b) t ->
('a, [< `R | `W > `R ]) t -> ('a, [< `R | `W > `R ]) t -> ('a, 'b) t
val scalar_add :
?res:('a, [< `R | `W > `W ] as 'b) t ->
('a, [< `R | `W > `R ]) t -> x:elt -> ('a, 'b) t
val scalar_mult :
?res:('a, [< `R | `W > `W ] as 'b) t ->
('a, [< `R | `W > `R ]) t -> x:elt -> ('a, 'b) t
val sum_elt : ('a, [< `R | `W > `R ]) t -> elt
val product_elt : ('a, [< `R | `W > `R ]) t -> elt
val dot_product :
('a, [< `R | `W > `R ]) t -> ('b, [< `R | `W > `R ]) t -> elt
module Infix :
sig
val ( * ) :
('a, [< `R | `W > `R ]) t ->
('a, [< `R | `W > `R ]) t -> ('a, [< `R | `W ]) t
val ( + ) :
('a, [< `R | `W > `R ]) t ->
('b, [< `R | `W > `R ]) t -> ('a, [< `R | `W ]) t
val ( *! ) :
('a, [< `R | `W > `R ]) t -> elt -> ('a, [< `R | `W ]) t
val ( +! ) :
('a, [< `R | `W > `R ]) t -> elt -> ('a, [< `R | `W ]) t
end
val ( * ) :
('a, [< `R | `W > `R ]) t ->
('a, [< `R | `W > `R ]) t -> ('a, [< `R | `W ]) t
val ( + ) :
('a, [< `R | `W > `R ]) t ->
('b, [< `R | `W > `R ]) t -> ('a, [< `R | `W ]) t
val ( *! ) : ('a, [< `R | `W > `R ]) t -> elt -> ('a, [< `R | `W ]) t
val ( +! ) : ('a, [< `R | `W > `R ]) t -> elt -> ('a, [< `R | `W ]) t
end
val to_list : ('a, 'b, [< `R | `W > `R ]) CCArray1.t -> 'a list
val to_array : ('a, 'b, [< `R | `W > `R ]) CCArray1.t -> 'a array
val to_seq : ('a, 'b, [< `R | `W > `R ]) CCArray1.t -> 'a CCArray1.sequence
val of_array :
kind:('a, 'b) Bigarray.kind ->
'a array -> ('a, 'b, [< `R | `W ]) CCArray1.t
val to_yojson :
'a CCArray1.to_json ->
('a, 'b, [< `R | `W > `R ]) CCArray1.t CCArray1.to_json
val of_yojson :
kind:('a, 'b) Bigarray.kind ->
'a CCArray1.of_json -> ('a, 'b, [< `R | `W ]) CCArray1.t CCArray1.of_json
val int_to_yojson : int CCArray1.to_json
val int_of_yojson : int CCArray1.of_json
val float_to_yojson : float CCArray1.to_json
val float_of_yojson : float CCArray1.of_json
module View :
sig
type 'a t
val of_array :
('a, 'b, [< `R | `W > `R ]) CCArray1.array_ -> 'a CCArray1.View.t
val get : 'a CCArray1.View.t -> int -> 'a
val length : 'a CCArray1.View.t -> int
val map : f:('a -> 'b) -> 'a CCArray1.View.t -> 'b CCArray1.View.t
val map2 :
f:('a -> 'b -> 'c) ->
'a CCArray1.View.t -> 'b CCArray1.View.t -> 'c CCArray1.View.t
val select :
idx:(int, 'b, [< `R | `W > `R ]) CCArray1.array_ ->
'a CCArray1.View.t -> 'a CCArray1.View.t
val select_a :
idx:int array -> 'a CCArray1.View.t -> 'a CCArray1.View.t
val select_view :
idx:int CCArray1.View.t -> 'a CCArray1.View.t -> 'a CCArray1.View.t
val foldi : ('b -> int -> 'a -> 'b) -> 'b -> 'a CCArray1.View.t -> 'b
val iteri : f:(int -> 'a -> unit) -> 'a CCArray1.View.t -> unit
module type S =
sig
type elt
val mult :
CCArray1.View.S.elt CCArray1.View.t ->
CCArray1.View.S.elt CCArray1.View.t ->
CCArray1.View.S.elt CCArray1.View.t
val add :
CCArray1.View.S.elt CCArray1.View.t ->
CCArray1.View.S.elt CCArray1.View.t ->
CCArray1.View.S.elt CCArray1.View.t
val sum :
CCArray1.View.S.elt CCArray1.View.t -> CCArray1.View.S.elt
val prod :
CCArray1.View.S.elt CCArray1.View.t -> CCArray1.View.S.elt
val add_scalar :
CCArray1.View.S.elt CCArray1.View.t ->
x:CCArray1.View.S.elt -> CCArray1.View.S.elt CCArray1.View.t
val mult_scalar :
CCArray1.View.S.elt CCArray1.View.t ->
x:CCArray1.View.S.elt -> CCArray1.View.S.elt CCArray1.View.t
end
module Int :
sig
type elt = int
val mult : elt t -> elt t -> elt t
val add : elt t -> elt t -> elt t
val sum : elt t -> elt
val prod : elt t -> elt
val add_scalar : elt t -> x:elt -> elt t
val mult_scalar : elt t -> x:elt -> elt t
end
module Float :
sig
type elt = float
val mult : elt t -> elt t -> elt t
val add : elt t -> elt t -> elt t
val sum : elt t -> elt
val prod : elt t -> elt
val add_scalar : elt t -> x:elt -> elt t
val mult_scalar : elt t -> x:elt -> elt t
end
val raw :
length:(('a, 'b, [< `R | `W > `R ]) CCArray1.array_ -> int) ->
get:(('a, 'b, [< `R | `W > `R ]) CCArray1.array_ -> int -> 'a) ->
('a, 'b, [< `R | `W > `R ]) CCArray1.array_ -> 'a CCArray1.View.t
val to_array :
?res:('a, 'b, [< `R | `W > `W ] as 'c) CCArray1.array_ ->
?kind:('a, 'b) Bigarray.kind ->
'a CCArray1.View.t -> ('a, 'b, 'c) CCArray1.array_
end
end