Module Float_u.Array

The Array module provides some helpers that wrap common operations on floatarrays with appropriate boxing or unboxing to work with float#.

These functions are provided just for convenience. They are equivalent (in semantics and performance) to just using the same functions from the Float_array library and appropriate calls to to_float or of_float. The compiler should erase the extra boxing/unboxing steps either way.

include Array with type t = Float_array.t and type elt := float
type t = Float_array.t
include Array_getters_and_setters with type t := t and type elt := float
val get : t @ local -> (int -> float) @ local
val set : t @ local -> (int -> (float -> unit) @ local) @ local
val unsafe_get : t @ local -> (int -> float) @ local
val unsafe_set : t @ local -> (int -> (float -> unit) @ local) @ local
val create : len:int -> float -> t
val length : t @ local -> int
val unsafe_blit : src:t @ local -> (src_pos:int -> (dst:t @ local -> (dst_pos:int -> (len:int -> unit) @ local) @ local) @ local) @ local
val compare : t -> t -> int
val copy : t -> t
val t_of_sexp : Core.Sexp.t -> t @@ portable
val sexp_of_t : t -> Core.Sexp.t @@ portable
val custom_sexp_of_t : (float -> Core.Sexp.t) -> t -> Core.Sexp.t
val custom_t_of_sexp : (Core.Sexp.t -> float) -> Core.Sexp.t -> t
val init : int -> f:(int -> float) -> t
val iter : t -> f:(float -> unit) -> unit
val iteri : t -> f:(int -> float -> unit) -> unit

Identity no-op conversions between t and elt array. They are the same type at runtime.

val to_float_u_array : t -> float array
val of_float_u_array : float array -> t
include Core.Bin_prot.Binable.S with type t := t
include Bin_prot.Binable.S_only_functions with type t := t
include sig ... end
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : t Bin_prot.Read.vtag_reader

This function only needs implementation if t exposed to be a polymorphic variant. Despite what the type reads, this does *not* produce a function after reading; instead it takes the constructor tag (int) before reading and reads the rest of the variant t afterwards.

val bin_shape_t : Bin_prot.Shape.t
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
module Permissioned : sig ... end