package osdp

  1. Overview
  2. Docs

Various utility functions.

val pp_list : sep:(unit, Format.formatter, unit) format -> (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a list -> unit
val pp_array : sep:(unit, Format.formatter, unit) format -> (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a array -> unit
val pp_matrix : begl:(unit, Format.formatter, unit) format -> endl:(unit, Format.formatter, unit) format -> sepl:(unit, Format.formatter, unit) format -> sepc:(unit, Format.formatter, unit) format -> (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a array array -> unit
val itv_float_of_q : Q.t -> float * float

itv_float_of_q q returns two floats l, u such that, when q is Q.undef, l and u are both nan, otherwise l <= q <= u and there is no float (either normal or subnormal) such that l < f < u.

val float_of_q : Q.t -> float

float_of_q q returns a float closest to q.

val setround_tonearest : unit -> unit
val profile : (unit -> 'a) -> 'a * float

profile f executes the function f and returns both its result and the execution time in second.

val map : ('a -> 'b) -> 'a list -> 'b list

tail-recursive version of List.map (implemented using List.rev_map and List.rev)

OCaml

Innovation. Community. Security.