Up

module Extended_array

: sig

Extensions to Core.Core_array.

#
val foldi : init:'a -> 'b array -> f:(int -> 'a -> 'b -> 'a) -> 'a
#
val random_split : ?random_state:Core.Std.Random.State.t -> 'a array -> p:float -> 'a array * 'a array

makes a random split & subset of an array; p (the fraction that you want to split) is constrained to be 0, 1. Note that the length of the first array will be the closest integer to the fraction you desired, meaning that each element is NOT selected with probability exactly p.

#
val random_sub : ?random_state:Core.Std.Random.State.t -> 'a array -> p:float -> 'a array
#
module Access_control : sig
#
type ('a, -'z) any
#
module Immutable : sig
#
type 'a t = ('a, Core.Std.immutable) any
include Core.Std.Sexpable.S1 with type 'a t := 'a t
include Core.Std.Binable.S1 with type 'a t := 'a t
end
#
module Read_only : sig
#
type 'a t = ('a, Core.Std.read) any
include Core.Std.Sexpable.S1 with type 'a t := 'a t
include Core.Std.Binable.S1 with type 'a t := 'a t
end
#
module Read_write : sig
#
type 'a t = ('a, Core.Std.read_write) any
include Core.Std.Sexpable.S1 with type 'a t := 'a t
include Core.Std.Binable.S1 with type 'a t := 'a t
end
#
type 'a t = 'a Immutable.t
include Core.Std.Sexpable.S1 with type 'a t := 'a t
include Core.Std.Binable.S1 with type 'a t := 'a t
#
val create : len:int -> 'a -> ('a, [<
| _ Core.Std.perms
]) any
#
val init : int -> f:(int -> 'a) -> ('a, [<
| _ Core.Std.perms
]) any
#
val of_array : 'a array -> 'a Read_write.t
#
val of_array_copy : 'a array -> ('a, [<
| _ Core.Std.perms
]) any
#
val to_array_copy : ('a, [>
| Core.Std.read
]) any -> 'a array
#
val get : ('a, [>
| Core.Std.read
]) any -> int -> 'a
#
val set : 'a Read_write.t -> int -> 'a -> unit
#
val append : ('a, [>
| Core.Std.read
]) any -> ('a, [>
| Core.Std.read
]) any -> ('a, [<
| _ Core.Std.perms
]) any
#
val copy : ('a, [>
| Core.Std.read
]) any -> ('a, [<
| _ Core.Std.perms
]) any
#
val map : f:('a -> 'b) -> ('a, [>
| Core.Std.read
]) any -> ('b, [<
| _ Core.Std.perms
]) any
#
val mapi : f:(int -> 'a -> 'b) -> ('a, [>
| Core.Std.read
]) any -> ('b, [<
| _ Core.Std.perms
]) any
#
val iteri : f:(int -> 'a -> unit) -> ('a, [>
| Core.Std.read
]) any -> unit
#
val filter_opt : ('a option, [>
| Core.Std.read
]) any -> ('a, [<
| _ Core.Std.perms
]) any
#
val filter_map : ('a, [>
| Core.Std.read
]) any -> f:('a -> 'b option) -> ('b, [<
| _ Core.Std.perms
]) any
#
val filter_mapi : ('a, [>
| Core.Std.read
]) any -> f:(int -> 'a -> 'b option) -> ('b, [<
| _ Core.Std.perms
]) any
#
val map2_exn : ('a, [>
| Core.Std.read
]) any -> ('b, [>
| Core.Std.read
]) any -> f:('a -> 'b -> 'c) -> ('c, [<
| _ Core.Std.perms
]) any
#
val findi : ('a, [>
| Core.Std.read
]) any -> f:(int -> 'a -> bool) -> (int * 'a) option
#
val blito : (('a, [>
| Core.Std.read
]) any, 'a Read_write.t) Core.Std.Blit.blito
#
val permute : ?random_state:Core.Std.Random.State.t -> _ Read_write.t -> unit
#
val fill : 'a Read_write.t -> pos:int -> len:int -> 'a -> unit
#
val of_list : 'a list -> ('a, [<
| _ Core.Std.perms
]) any
include Core.Std.Container.S1_phantom_permissions with type ('a, 'phantom) t := ('a, 'phantom) any
#
val bin_any : 'a Core.Std.Bin_prot.Type_class.t -> 'z Core.Std.Bin_prot.Type_class.t -> ('a, 'z) any Core.Std.Bin_prot.Type_class.t
#
val bin_read_any : 'a Core.Std.Bin_prot.Read.reader -> 'z Core.Std.Bin_prot.Read.reader -> ('a, 'z) any Core.Std.Bin_prot.Read.reader
#
val __bin_read_any__ : 'a Core.Std.Bin_prot.Read.reader -> 'z Core.Std.Bin_prot.Read.reader -> (int -> ('a, 'z) any) Core.Std.Bin_prot.Read.reader
#
val bin_reader_any : 'a Core.Std.Bin_prot.Type_class.reader -> 'z Core.Std.Bin_prot.Type_class.reader -> ('a, 'z) any Core.Std.Bin_prot.Type_class.reader
#
val bin_size_any : 'a Core.Std.Bin_prot.Size.sizer -> 'z Core.Std.Bin_prot.Size.sizer -> ('a, 'z) any Core.Std.Bin_prot.Size.sizer
#
val bin_write_any : 'a Core.Std.Bin_prot.Write.writer -> 'z Core.Std.Bin_prot.Write.writer -> ('a, 'z) any Core.Std.Bin_prot.Write.writer
#
val bin_writer_any : 'a Core.Std.Bin_prot.Type_class.writer -> 'z Core.Std.Bin_prot.Type_class.writer -> ('a, 'z) any Core.Std.Bin_prot.Type_class.writer
#
val any_of_sexp : (Sexplib.Sexp.t -> 'a) -> (Sexplib.Sexp.t -> 'z) -> Sexplib.Sexp.t -> ('a, 'z) any
#
val sexp_of_any : ('a -> Sexplib.Sexp.t) -> ('z -> Sexplib.Sexp.t) -> ('a, 'z) any -> Sexplib.Sexp.t
end
end