sig
module List :
sig
val range : int -> int list
val wrap : 'a -> 'a list
val cons : 'a -> 'a list -> 'a list
val remove_fast : 'a -> 'a list -> 'a list
val sum : int list -> int
val sumf : float list -> float
val sum_map : ('a -> int) -> 'a list -> int
val sumf_map : ('a -> float) -> 'a list -> float
val count : ('a -> bool) -> 'a list -> int
val rev_iter : ('a -> unit) -> 'a list -> unit
val iter3 :
('a -> 'b -> 'c -> 'd) -> 'a list -> 'b list -> 'c list -> unit
val map3 :
('a -> 'b -> 'c -> 'd) -> 'a list -> 'b list -> 'c list -> 'd list
val split3 : ('a * 'b * 'c) list -> 'a list * 'b list * 'c list
val transpose : 'a list list -> 'a list list
val rem_first : 'a list -> 'a list
val rem_item : 'a list -> 'a -> 'a list
val length : 'a list -> int
val hd : 'a list -> 'a
val tl : 'a list -> 'a list
val nth : 'a list -> int -> 'a
val rev : 'a list -> 'a list
val append : 'a list -> 'a list -> 'a list
val rev_append : 'a list -> 'a list -> 'a list
val concat : 'a list list -> 'a list
val flatten : 'a list list -> 'a list
val iter : ('a -> unit) -> 'a list -> unit
val iteri : (int -> 'a -> unit) -> 'a list -> unit
val map : ('a -> 'b) -> 'a list -> 'b list
val rev_map : ('a -> 'b) -> 'a list -> 'b list
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a
val fold_right : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b
val iter2 : ('a -> 'b -> unit) -> 'a list -> 'b list -> unit
val map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list
val rev_map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list
val fold_right2 :
('a -> 'b -> 'c -> 'c) -> 'a list -> 'b list -> 'c -> 'c
val for_all : ('a -> bool) -> 'a list -> bool
val exists : ('a -> bool) -> 'a list -> bool
val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool
val exists2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool
val mem : 'a -> 'a list -> bool
val memq : 'a -> 'a list -> bool
val find : ('a -> bool) -> 'a list -> 'a
val filter : ('a -> bool) -> 'a list -> 'a list
val find_all : ('a -> bool) -> 'a list -> 'a list
val partition : ('a -> bool) -> 'a list -> 'a list * 'a list
val assoc : 'a -> ('a * 'b) list -> 'b
val assq : 'a -> ('a * 'b) list -> 'b
val mem_assoc : 'a -> ('a * 'b) list -> bool
val mem_assq : 'a -> ('a * 'b) list -> bool
val remove_assoc : 'a -> ('a * 'b) list -> ('a * 'b) list
val remove_assq : 'a -> ('a * 'b) list -> ('a * 'b) list
val split : ('a * 'b) list -> 'a list * 'b list
val combine : 'a list -> 'b list -> ('a * 'b) list
val sort : ('a -> 'a -> int) -> 'a list -> 'a list
val stable_sort : ('a -> 'a -> int) -> 'a list -> 'a list
val fast_sort : ('a -> 'a -> int) -> 'a list -> 'a list
val merge : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list
val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list
val fold_left2 :
('a -> 'b -> 'c -> 'a) -> 'a -> 'b list -> 'c list -> 'a
end
module Array :
sig
val sum : int array -> int
val sumf : float array -> float
val sum_map : ('a -> int) -> 'a array -> int
val sumf_map : ('a -> float) -> 'a array -> float
val find : ('a -> bool) -> 'a array -> 'a
val map2 : ('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array
val iter2 : ('a -> 'b -> 'c) -> 'a array -> 'b array -> unit
val rev_iter : ('a -> 'b) -> 'a array -> unit
exception Found
val exists : ('a -> bool) -> 'a array -> bool
val for_all : ('a -> bool) -> 'a array -> bool
val count : ('a -> bool) -> 'a array -> int
val min : 'a array -> 'a
val max : 'a array -> 'a
val argmin : 'a array -> int
val argmax : 'a array -> int
val rev_inplace : 'a array -> unit
val transpose : 'a array array -> 'a array array
val flattenl : 'a list array -> 'a array
val flatten : 'a array array -> 'a array
val rev_flatten : 'a array -> int -> int -> 'a array array
val filter : ('a -> bool) -> 'a array -> 'a array
val partition : ('a -> bool) -> 'a array -> 'a array * 'a array
val rev : 'a array -> 'a array
val trans : 'a array array -> 'a array array
val take : 'a array -> int array -> 'a array
val takeCol : 'a array array -> int array -> 'a array array
val takeRow : 'a array array -> int array -> 'a array array
val range : int -> int array
val augment : 'a array -> ('a * int) array
external length : 'a array -> int = "%array_length"
external get : 'a array -> int -> 'a = "%array_safe_get"
external set : 'a array -> int -> 'a -> unit = "%array_safe_set"
external make : int -> 'a -> 'a array = "caml_make_vect"
external create : int -> 'a -> 'a array = "caml_make_vect"
val init : int -> (int -> 'a) -> 'a array
val make_matrix : int -> int -> 'a -> 'a array array
val create_matrix : int -> int -> 'a -> 'a array array
val append : 'a array -> 'a array -> 'a array
val concat : 'a array list -> 'a array
val sub : 'a array -> int -> int -> 'a array
val copy : 'a array -> 'a array
val fill : 'a array -> int -> int -> 'a -> unit
val blit : 'a array -> int -> 'a array -> int -> int -> unit
val to_list : 'a array -> 'a list
val of_list : 'a list -> 'a array
val iter : ('a -> unit) -> 'a array -> unit
val map : ('a -> 'b) -> 'a array -> 'b array
val iteri : (int -> 'a -> unit) -> 'a array -> unit
val mapi : (int -> 'a -> 'b) -> 'a array -> 'b array
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b array -> 'a
val fold_right : ('b -> 'a -> 'a) -> 'b array -> 'a -> 'a
val sort : ('a -> 'a -> int) -> 'a array -> unit
val stable_sort : ('a -> 'a -> int) -> 'a array -> unit
val fast_sort : ('a -> 'a -> int) -> 'a array -> unit
external unsafe_get : 'a array -> int -> 'a = "%array_unsafe_get"
external unsafe_set : 'a array -> int -> 'a -> unit
= "%array_unsafe_set"
end
module Hashtbl :
sig
val keys_to_list : ('a, 'b) Hashtbl.t -> 'a list
val dfind : ('a, 'b) Hashtbl.t -> 'a -> 'b -> 'b
type ('a, 'b) t = ('a, 'b) Hashtbl.t
val create : ?random:bool -> int -> ('a, 'b) Ext.Hashtbl.t
val clear : ('a, 'b) Ext.Hashtbl.t -> unit
val reset : ('a, 'b) Ext.Hashtbl.t -> unit
val copy : ('a, 'b) Ext.Hashtbl.t -> ('a, 'b) Ext.Hashtbl.t
val add : ('a, 'b) Ext.Hashtbl.t -> 'a -> 'b -> unit
val find : ('a, 'b) Ext.Hashtbl.t -> 'a -> 'b
val find_all : ('a, 'b) Ext.Hashtbl.t -> 'a -> 'b list
val mem : ('a, 'b) Ext.Hashtbl.t -> 'a -> bool
val remove : ('a, 'b) Ext.Hashtbl.t -> 'a -> unit
val replace : ('a, 'b) Ext.Hashtbl.t -> 'a -> 'b -> unit
val iter : ('a -> 'b -> unit) -> ('a, 'b) Ext.Hashtbl.t -> unit
val fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) Ext.Hashtbl.t -> 'c -> 'c
val length : ('a, 'b) Ext.Hashtbl.t -> int
val randomize : unit -> unit
type statistics =
Hashtbl.statistics = {
num_bindings : int;
num_buckets : int;
max_bucket_length : int;
bucket_histogram : int array;
}
val stats : ('a, 'b) Ext.Hashtbl.t -> Ext.Hashtbl.statistics
module type HashedType =
sig
type t
val equal :
Ext.Hashtbl.HashedType.t -> Ext.Hashtbl.HashedType.t -> bool
val hash : Ext.Hashtbl.HashedType.t -> int
end
module type S =
sig
type key
type 'a t
val create : int -> 'a Ext.Hashtbl.S.t
val clear : 'a Ext.Hashtbl.S.t -> unit
val reset : 'a Ext.Hashtbl.S.t -> unit
val copy : 'a Ext.Hashtbl.S.t -> 'a Ext.Hashtbl.S.t
val add : 'a Ext.Hashtbl.S.t -> Ext.Hashtbl.S.key -> 'a -> unit
val remove : 'a Ext.Hashtbl.S.t -> Ext.Hashtbl.S.key -> unit
val find : 'a Ext.Hashtbl.S.t -> Ext.Hashtbl.S.key -> 'a
val find_all : 'a Ext.Hashtbl.S.t -> Ext.Hashtbl.S.key -> 'a list
val replace : 'a Ext.Hashtbl.S.t -> Ext.Hashtbl.S.key -> 'a -> unit
val mem : 'a Ext.Hashtbl.S.t -> Ext.Hashtbl.S.key -> bool
val iter :
(Ext.Hashtbl.S.key -> 'a -> unit) -> 'a Ext.Hashtbl.S.t -> unit
val fold :
(Ext.Hashtbl.S.key -> 'a -> 'b -> 'b) ->
'a Ext.Hashtbl.S.t -> 'b -> 'b
val length : 'a Ext.Hashtbl.S.t -> int
val stats : 'a Ext.Hashtbl.S.t -> Ext.Hashtbl.statistics
end
module Make :
functor (H : HashedType) ->
sig
type key = H.t
type 'a t = 'a Hashtbl.Make(H).t
val create : int -> 'a Ext.Hashtbl.Make.t
val clear : 'a Ext.Hashtbl.Make.t -> unit
val reset : 'a Ext.Hashtbl.Make.t -> unit
val copy : 'a Ext.Hashtbl.Make.t -> 'a Ext.Hashtbl.Make.t
val add :
'a Ext.Hashtbl.Make.t -> Ext.Hashtbl.Make.key -> 'a -> unit
val remove :
'a Ext.Hashtbl.Make.t -> Ext.Hashtbl.Make.key -> unit
val find : 'a Ext.Hashtbl.Make.t -> Ext.Hashtbl.Make.key -> 'a
val find_all :
'a Ext.Hashtbl.Make.t -> Ext.Hashtbl.Make.key -> 'a list
val replace :
'a Ext.Hashtbl.Make.t -> Ext.Hashtbl.Make.key -> 'a -> unit
val mem : 'a Ext.Hashtbl.Make.t -> Ext.Hashtbl.Make.key -> bool
val iter :
(Ext.Hashtbl.Make.key -> 'a -> unit) ->
'a Ext.Hashtbl.Make.t -> unit
val fold :
(Ext.Hashtbl.Make.key -> 'a -> 'b -> 'b) ->
'a Ext.Hashtbl.Make.t -> 'b -> 'b
val length : 'a Ext.Hashtbl.Make.t -> int
val stats : 'a Ext.Hashtbl.Make.t -> Ext.Hashtbl.statistics
end
module type SeededHashedType =
sig
type t
val equal :
Ext.Hashtbl.SeededHashedType.t ->
Ext.Hashtbl.SeededHashedType.t -> bool
val hash : int -> Ext.Hashtbl.SeededHashedType.t -> int
end
module type SeededS =
sig
type key
type 'a t
val create : ?random:bool -> int -> 'a Ext.Hashtbl.SeededS.t
val clear : 'a Ext.Hashtbl.SeededS.t -> unit
val reset : 'a Ext.Hashtbl.SeededS.t -> unit
val copy : 'a Ext.Hashtbl.SeededS.t -> 'a Ext.Hashtbl.SeededS.t
val add :
'a Ext.Hashtbl.SeededS.t -> Ext.Hashtbl.SeededS.key -> 'a -> unit
val remove :
'a Ext.Hashtbl.SeededS.t -> Ext.Hashtbl.SeededS.key -> unit
val find :
'a Ext.Hashtbl.SeededS.t -> Ext.Hashtbl.SeededS.key -> 'a
val find_all :
'a Ext.Hashtbl.SeededS.t -> Ext.Hashtbl.SeededS.key -> 'a list
val replace :
'a Ext.Hashtbl.SeededS.t -> Ext.Hashtbl.SeededS.key -> 'a -> unit
val mem :
'a Ext.Hashtbl.SeededS.t -> Ext.Hashtbl.SeededS.key -> bool
val iter :
(Ext.Hashtbl.SeededS.key -> 'a -> unit) ->
'a Ext.Hashtbl.SeededS.t -> unit
val fold :
(Ext.Hashtbl.SeededS.key -> 'a -> 'b -> 'b) ->
'a Ext.Hashtbl.SeededS.t -> 'b -> 'b
val length : 'a Ext.Hashtbl.SeededS.t -> int
val stats : 'a Ext.Hashtbl.SeededS.t -> Ext.Hashtbl.statistics
end
module MakeSeeded :
functor (H : SeededHashedType) ->
sig
type key = H.t
type 'a t = 'a Hashtbl.MakeSeeded(H).t
val create : ?random:bool -> int -> 'a Ext.Hashtbl.MakeSeeded.t
val clear : 'a Ext.Hashtbl.MakeSeeded.t -> unit
val reset : 'a Ext.Hashtbl.MakeSeeded.t -> unit
val copy :
'a Ext.Hashtbl.MakeSeeded.t -> 'a Ext.Hashtbl.MakeSeeded.t
val add :
'a Ext.Hashtbl.MakeSeeded.t ->
Ext.Hashtbl.MakeSeeded.key -> 'a -> unit
val remove :
'a Ext.Hashtbl.MakeSeeded.t ->
Ext.Hashtbl.MakeSeeded.key -> unit
val find :
'a Ext.Hashtbl.MakeSeeded.t -> Ext.Hashtbl.MakeSeeded.key -> 'a
val find_all :
'a Ext.Hashtbl.MakeSeeded.t ->
Ext.Hashtbl.MakeSeeded.key -> 'a list
val replace :
'a Ext.Hashtbl.MakeSeeded.t ->
Ext.Hashtbl.MakeSeeded.key -> 'a -> unit
val mem :
'a Ext.Hashtbl.MakeSeeded.t ->
Ext.Hashtbl.MakeSeeded.key -> bool
val iter :
(Ext.Hashtbl.MakeSeeded.key -> 'a -> unit) ->
'a Ext.Hashtbl.MakeSeeded.t -> unit
val fold :
(Ext.Hashtbl.MakeSeeded.key -> 'a -> 'b -> 'b) ->
'a Ext.Hashtbl.MakeSeeded.t -> 'b -> 'b
val length : 'a Ext.Hashtbl.MakeSeeded.t -> int
val stats : 'a Ext.Hashtbl.MakeSeeded.t -> Ext.Hashtbl.statistics
end
val hash : 'a -> int
val seeded_hash : int -> 'a -> int
val hash_param : int -> int -> 'a -> int
val seeded_hash_param : int -> int -> int -> 'a -> int
end
module Hashset :
sig
type 'a t = ('a, unit) Ext.Hashtbl.t
val create : ?random:bool -> int -> ('a, 'b) Ext.Hashtbl.t
val add : ('a, unit) Ext.Hashtbl.t -> 'a -> unit
val mem : ('a, 'b) Ext.Hashtbl.t -> 'a -> bool
val iter : ('a -> unit) -> ('a, unit) Ext.Hashtbl.t -> unit
val fold : ('a -> 'b -> 'b) -> ('a, unit) Ext.Hashtbl.t -> 'b -> 'b
val to_list : ('a, unit) Ext.Hashtbl.t -> 'a list
val sum_map : ('a -> int) -> ('a, unit) Ext.Hashtbl.t -> int
val sumf_map : ('a -> float) -> ('a, unit) Ext.Hashtbl.t -> float
val filter : ('a -> bool) -> ('a, unit) Ext.Hashtbl.t -> unit
type 'a t' = ('a, unit) Ext.Hashtbl.t
end
module String :
sig
val match_beg : string -> string -> int -> bool
val match_end : string -> string -> int -> bool
val suffix : string -> string -> bool
val prefix : string -> string -> bool
external length : string -> int = "%string_length"
external get : string -> int -> char = "%string_safe_get"
external set : string -> int -> char -> unit = "%string_safe_set"
external create : int -> string = "caml_create_string"
val make : int -> char -> string
val copy : string -> string
val sub : string -> int -> int -> string
val fill : string -> int -> int -> char -> unit
val blit : string -> int -> string -> int -> int -> unit
val concat : string -> string list -> string
val iter : (char -> unit) -> string -> unit
val iteri : (int -> char -> unit) -> string -> unit
val map : (char -> char) -> string -> string
val trim : string -> string
val escaped : string -> string
val index : string -> char -> int
val rindex : string -> char -> int
val index_from : string -> int -> char -> int
val rindex_from : string -> int -> char -> int
val contains : string -> char -> bool
val contains_from : string -> int -> char -> bool
val rcontains_from : string -> int -> char -> bool
val uppercase : string -> string
val lowercase : string -> string
val capitalize : string -> string
val uncapitalize : string -> string
type t = string
val compare : Ext.String.t -> Ext.String.t -> int
external unsafe_get : string -> int -> char = "%string_unsafe_get"
external unsafe_set : string -> int -> char -> unit
= "%string_unsafe_set"
external unsafe_blit : string -> int -> string -> int -> int -> unit
= "caml_blit_string" "noalloc"
external unsafe_fill : string -> int -> int -> char -> unit
= "caml_fill_string" "noalloc"
end
module Heap :
sig
type 'a heap =
'a Heap.heap = {
mutable data : 'a array;
mutable size : int;
lessthan : 'a -> 'a -> bool;
}
val create : ('a -> 'a -> bool) -> int -> 'a Ext.Heap.heap
val realloc : 'a Ext.Heap.heap -> int -> unit
val size : 'a Ext.Heap.heap -> int
val is_empty : 'a Ext.Heap.heap -> bool
val grow : 'a Ext.Heap.heap -> unit
val swap : 'a Ext.Heap.heap -> int -> int -> unit
val sift_down : 'a Ext.Heap.heap -> int -> unit
val sift_up : 'a Ext.Heap.heap -> int -> unit
val add : 'a Ext.Heap.heap -> 'a -> unit
val remove_min : 'a Ext.Heap.heap -> unit
val get : 'a Ext.Heap.heap -> int -> 'a
val remove : 'a Ext.Heap.heap -> int -> unit
val min : 'a Ext.Heap.heap -> 'a
val rebuild : 'a Ext.Heap.heap -> unit
val build : ('a -> 'a -> bool) -> 'a array -> 'a Ext.Heap.heap
val remove_all : 'a Ext.Heap.heap -> ('a -> bool) -> unit
val clear : 'a Ext.Heap.heap -> unit
val iter : ('a -> 'b) -> 'a Ext.Heap.heap -> unit
val to_array : 'a Ext.Heap.heap -> 'a array
val to_list : 'a Ext.Heap.heap -> 'a list
end
module Timer :
sig
val start_time_hash : (string, float) Ext.Hashtbl.t
val elapsed_time_hash : (string, float) Ext.Hashtbl.t
val last_elapsed_time_hash : (string, float) Ext.Hashtbl.t
val start : string -> unit
val delta : string -> float
val elapsed : string -> float
val last_elapsed : string -> float
val stop : string -> unit
val clear : string -> unit
end
type libra_filetype =
ACFile
| BNFile
| MNFile
| DataFile
| SPNFile
| UnknownFile
val filetype : string -> Ext.libra_filetype
val compose : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b
val ( $ ) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b
val identity : 'a -> 'a
val absf : float -> float
val f_true : 'a -> bool
val log_zero : float
val log_one : float
val maxf : float -> float -> float
val minf : float -> float -> float
val fast_exp : float -> float
val logsumexp : float list -> float
val alogsumexp : float array -> float
val logsumexp2 : float -> float -> float
exception EmptyList
val dotprod : float list -> float list -> float
val dotprod_bias : float list -> float list -> float -> float
val adotprod : float array -> float array -> float
val adotprod_bias : float array -> float array -> float -> float
val adotprod_autobias : float array -> float array -> float
val normalize_inplace_raw : float array -> unit
val normalize_inplace_log : float array -> unit
val normalize_raw : float array -> float array
val normalize_log : float array -> float array
type stats_counter =
float Pervasives.ref * float Pervasives.ref * float Pervasives.ref
val stats_make : unit -> Ext.stats_counter
val stats_add : Ext.stats_counter -> float -> unit
val stats_wadd : Ext.stats_counter -> float -> float -> unit
val stats_n : Ext.stats_counter -> float
val stats_sum : Ext.stats_counter -> float
val stats_mean : Ext.stats_counter -> float
val stats_var : Ext.stats_counter -> float
val stats_stddev : Ext.stats_counter -> float
val stats_stderr : Ext.stats_counter -> float
val common_arguments : (string * Arg.spec * string) list
val output_int : Pervasives.out_channel -> int -> unit
val output_float : Pervasives.out_channel -> float -> unit
val output_sep : Pervasives.out_channel -> string -> string array -> unit
val log_normal : string
val log_verbose : string
val log_debug : string
val log_hash : (string, Pervasives.out_channel) Ext.Hashtbl.t
val register_log : string -> Pervasives.out_channel -> unit
val unregister_log : string -> unit
val log_exists : string -> bool
val log_stream : string -> Pervasives.out_channel
val log_string : string -> string -> unit
val logf : string -> ('a, unit, string, unit) Pervasives.format4 -> 'a
val nlogf : ('a, unit, string, unit) Pervasives.format4 -> 'a
val vlogf : ('a, unit, string, unit) Pervasives.format4 -> 'a
val vlogfz :
('a -> unit, unit, string, unit) Pervasives.format4 -> 'a lazy_t -> unit
val vlogfz2 :
('a -> 'b -> unit, unit, string, unit) Pervasives.format4 ->
'a lazy_t -> 'b lazy_t -> unit
val vlogfz3 :
('a -> 'b -> 'c -> unit, unit, string, unit) Pervasives.format4 ->
'a lazy_t -> 'b lazy_t -> 'c lazy_t -> unit
val vlogfz4 :
('a -> 'b -> 'c -> 'd -> unit, unit, string, unit) Pervasives.format4 ->
'a lazy_t -> 'b lazy_t -> 'c lazy_t -> 'd lazy_t -> unit
val dlogf : ('a, unit, string, unit) Pervasives.format4 -> 'a
val dlogfz :
('a -> unit, unit, string, unit) Pervasives.format4 -> 'a lazy_t -> unit
val dlogfz2 :
('a -> 'b -> unit, unit, string, unit) Pervasives.format4 ->
'a lazy_t -> 'b lazy_t -> unit
val dlogfz3 :
('a -> 'b -> 'c -> unit, unit, string, unit) Pervasives.format4 ->
'a lazy_t -> 'b lazy_t -> 'c lazy_t -> unit
val dlogfz4 :
('a -> 'b -> 'c -> 'd -> unit, unit, string, unit) Pervasives.format4 ->
'a lazy_t -> 'b lazy_t -> 'c lazy_t -> 'd lazy_t -> unit
val log_args : unit -> unit
val common_log_init : unit -> unit
val debug : string -> unit
val string_of_ilist : int list -> string
val string_of_flist : float list -> string
val string_of_iarray : int array -> string
val string_of_farray : float array -> string
end