10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-11-18 12:03:40 +01:00
QCaml/common/lib/util.mli

97 lines
3.3 KiB
OCaml
Raw Normal View History

2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/util.org::*Erf][Erf:2]] *)
2021-01-28 00:34:26 +01:00
external erf_float : float -> float
= "erf_float_bytecode" "erf_float" [@@unboxed] [@@noalloc]
2020-12-28 01:08:55 +01:00
(* Erf:2 ends here *)
2018-02-24 23:57:38 +01:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/util.org::*Erfc][Erfc:2]] *)
2021-01-28 00:34:26 +01:00
external erfc_float : float -> float
= "erfc_float_bytecode" "erfc_float" [@@unboxed] [@@noalloc]
2020-12-28 01:08:55 +01:00
(* Erfc:2 ends here *)
2020-10-02 18:55:19 +02:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/util.org::*Gamma][Gamma:2]] *)
2021-01-28 00:34:26 +01:00
external gamma_float : float -> float
= "gamma_float_bytecode" "gamma_float" [@@unboxed] [@@noalloc]
2020-12-28 01:08:55 +01:00
(* Gamma:2 ends here *)
2020-10-02 18:55:19 +02:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/util.org::*Popcnt][Popcnt:2]] *)
2019-03-03 01:43:04 +01:00
val popcnt : int64 -> int
2020-12-28 01:08:55 +01:00
(* Popcnt:2 ends here *)
2019-03-03 01:43:04 +01:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/util.org::*Trailz][Trailz:2]] *)
2019-03-03 01:43:04 +01:00
val trailz : int64 -> int
2020-12-28 01:08:55 +01:00
(* Trailz:2 ends here *)
2019-03-03 01:43:04 +01:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/util.org::*Leadz][Leadz:2]] *)
2019-03-26 01:20:17 +01:00
val leadz : int64 -> int
2020-12-28 01:08:55 +01:00
(* Leadz:2 ends here *)
2019-03-26 01:20:17 +01:00
2020-12-28 01:08:55 +01:00
(* General functions *)
2018-02-24 23:57:38 +01:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/util.org::*General%20functions][General functions:1]] *)
2018-02-24 23:57:38 +01:00
val fact : int -> float
2020-12-28 01:08:55 +01:00
(* @raise Invalid_argument for negative arguments or arguments >100. *)
val binom : int -> int -> int
2020-02-17 19:45:53 +01:00
val binom_float : int -> int -> float
2018-02-24 23:57:38 +01:00
2020-12-28 01:08:55 +01:00
val chop : float -> (unit -> float) -> float
val pow : float -> int -> float
2020-02-17 19:45:53 +01:00
val float_of_int_fast : int -> float
2018-02-24 23:57:38 +01:00
2020-02-17 19:45:53 +01:00
val of_some : 'a option -> 'a
2021-01-01 16:39:33 +01:00
exception Not_implemented of string
val not_implemented : string -> 'a
(* @raise Not_implemented. *)
2020-12-28 01:08:55 +01:00
(* General functions:1 ends here *)
2018-02-24 23:57:38 +01:00
2020-12-28 01:08:55 +01:00
(* Functions related to the Boys function *)
2018-02-24 23:57:38 +01:00
2020-12-28 01:08:55 +01:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/util.org::*Functions%20related%20to%20the%20Boys%20function][Functions related to the Boys function:1]] *)
2018-02-24 23:57:38 +01:00
val incomplete_gamma : alpha:float -> float -> float
2020-12-28 01:08:55 +01:00
(* @raise Failure when the calculation doesn't converge. *)
(* Functions related to the Boys function:1 ends here *)
2018-02-24 23:57:38 +01:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/util.org::*Functions%20related%20to%20the%20Boys%20function][Functions related to the Boys function:3]] *)
2018-02-24 23:57:38 +01:00
val boys_function : maxm:int -> float -> float array
2020-12-28 01:08:55 +01:00
(* Functions related to the Boys function:3 ends here *)
2018-02-24 23:57:38 +01:00
2020-12-28 01:08:55 +01:00
(* List functions *)
2018-02-24 23:57:38 +01:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/util.org::*List%20functions][List functions:1]] *)
2020-12-28 01:08:55 +01:00
val list_some : 'a option list -> 'a list
val list_range : int -> int -> int list
val list_pack : int -> 'a list -> 'a list list
(* List functions:1 ends here *)
2020-02-17 19:45:53 +01:00
2020-12-28 01:08:55 +01:00
(* Array functions *)
2018-02-24 23:57:38 +01:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/util.org::*Array%20functions][Array functions:1]] *)
2020-12-28 01:08:55 +01:00
val array_range : int -> int -> int array
val array_sum : float array -> float
2018-02-24 23:57:38 +01:00
val array_product : float array -> float
2020-12-28 01:08:55 +01:00
(* Array functions:1 ends here *)
2018-02-24 23:57:38 +01:00
2020-12-28 01:08:55 +01:00
(* Stream functions *)
2018-07-20 16:09:06 +02:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/util.org::*Stream%20functions][Stream functions:1]] *)
2020-12-28 01:08:55 +01:00
val stream_range : int -> int -> int Stream.t
2019-02-25 14:37:20 +01:00
val stream_to_list : 'a Stream.t -> 'a list
2020-12-28 01:08:55 +01:00
val stream_fold : ('a -> 'b -> 'a) -> 'a -> 'b Stream.t -> 'a
(* Stream functions:1 ends here *)
2019-03-20 23:10:53 +01:00
2020-12-28 01:08:55 +01:00
(* Printers *)
2019-03-20 23:10:53 +01:00
2018-03-15 15:25:49 +01:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/util.org::*Printers][Printers:1]] *)
2020-12-28 01:08:55 +01:00
val pp_float_array_size : Format.formatter -> float array -> unit
val pp_float_array : Format.formatter -> float array -> unit
2018-03-20 14:11:31 +01:00
val pp_float_2darray_size : Format.formatter -> float array array -> unit
2020-12-28 01:08:55 +01:00
val pp_float_2darray : Format.formatter -> float array array -> unit
val pp_bitstring : int -> Format.formatter -> Z.t -> unit
(* Printers:1 ends here *)