module BC_Utils: sig end
Miscellaneous utility functions.
Author(s): Hideo Bannai
val log2 : float -> float
log base 2
val iter_line : (string -> unit) -> Pervasives.in_channel -> unit
run function for each line of input until End of file is read
val arg_min : ('a -> 'b) -> 'a -> 'a -> 'a
arg_min f x y
compares f x and f y and gives the
argument: x or y which gives Pervasives.min (f x) (f y)
val arg_max : ('a -> 'b) -> 'a -> 'a -> 'a
arg_max f x y
compares f x and f y and gives the
argument: x or y which gives Pervasives.max (f x) (f y)
val delimit_eval : Pervasives.out_channel -> string -> string -> (unit -> 'a) -> 'a
delimit_eval outch before after f
evaluates function: f () and returns its results.
Prints the strings before and after, before and after the evaluation of f ()