package dose3

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Dose_common.UtilSource

Sourceval uuid : unit -> string

return a unique identifier based on random numbers

Sourceval list_unique : 'a list -> 'a list

return a list of unique elements. This algorithm runs in O(n) but is not stable . elements are returned in reverse order

Sourceval memo : ('a -> 'b) -> 'a -> 'b

A generic memoization function. To use with care as it allocates an hashtbl storing all results that will be released only on exit

Sourceval timestamp : unit -> string
Sourceval max32int : int

Debug, ProgressBars, Timers and Loggers

Sourcetype label = string
Sourcemodule type Messages = sig ... end

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) ;;

Sourcemodule Logging (X : sig ... end) : sig ... end
Sourcemodule Progress : sig ... 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)

Sourcemodule Timer : sig ... end

Timers are printed all at once by the dump function on stderr. * They can enabled or disabled (default)

Sourcemodule IntHashtbl : Hashtbl.S with type key = int
Sourcemodule IntPairHashtbl : Hashtbl.S with type key = int * int
Sourcemodule StringHashtbl : Hashtbl.S with type key = string
Sourcemodule StringPairHashtbl : Hashtbl.S with type key = string * string
Sourceval hashcons : string StringHashtbl.t -> string -> string

hash consing for strings

Sourceval hits : int ref
Sourceval miss : int ref
Sourceval range : int -> int -> int list
Sourceval string_of_list : ?delim:(string * string) -> ?sep:string -> ('a -> string) -> 'a list -> string
Sourceclass type projection = object ... end

associate a sat solver variable to a package id

identity projection

intprojection n integer projection of size n

OCaml

Innovation. Community. Security.