package dose3
Install
Dune Dependency
Authors
Maintainers
Sources
md5=dedc2f58f2c2b59021f484abc6681d93
sha512=603462645bac190892a816ecb36ef7b9c52f0020f8d7710dc430e2db65122090fdedb24a8d2e03c32bf53a96515f5b51499603b839680d0a7a2146d6e0fb6e34
doc/dose3.common/Dose_common/Util/index.html
Module Dose_common.Util
Source
return a unique identifier based on random numbers
return a list of unique elements. This algorithm runs in O(n) but is not stable . elements are returned in reverse order
A generic memoization function. To use with care as it allocates an hashtbl storing all results that will be released only on exit
Debug, ProgressBars, Timers and Loggers
Debug, Info and Warning messages are printed immediately on stderr. * Info messages are enabled per default. Debug and Warning messages * must be enabled explicitely
Ex : To use the Message framework, you should declare three functions * at the begin of each module as:
let debug fmt = Util.make_debug "MyModuleLabel" fmt let info fmt = Util.make_info "MyModuleLabel" fmt let warning fmt = Util.make_warning "MyModuleLabel" fmt
and then use these function as
debug "this is a message string %s" "a string"
To enable this handle, from the main program use the function
Debug.enable "MyModuleLabel"
include Util.Logging(struct let label = "label" end) ;;
ProgressBars are printed immediately on stderr. * To be used, the **must** be created outside the functions where * they are used. * They can enabled or disabled (default)
Timers are printed all at once by the dump
function on stderr. * They can enabled or disabled (default)
hash consing for strings
val string_of_list :
?delim:(string * string) ->
?sep:string ->
('a -> string) ->
'a list ->
string
associate a sat solver variable to a package id
identity projection
intprojection n
integer projection of size n