sig
module Descriptor : UnionFind.Desc
type ('a, 'b) case = A of 'a | B of 'b
val comp_to_list : ('a -> 'b -> int) -> 'a list -> 'b list -> int
val comp_to_array : ('a -> 'b -> int) -> int -> 'a array -> 'b array -> int
val comp_to_pair :
('a -> 'b -> int) -> ('c -> 'd -> int) -> 'a * 'c -> 'b * 'd -> int
val comp_to_pair2 :
('a -> 'b -> int) -> ('c -> 'd -> int) -> 'a * 'c -> 'b * 'd -> int
val comp_to_tripl :
('a -> 'b -> int) ->
('c -> 'd -> int) ->
('e -> 'f -> int) -> 'a * 'c * 'e -> 'b * 'd * 'f -> int
val comp_to_option : ('a -> 'b -> int) -> 'a option -> 'b option -> int
module type Base =
sig type t val compare : Tools.Base.t -> Tools.Base.t -> int end
module CaseB :
functor (B1 : Base) ->
functor (B2 : Base) ->
sig
type t = (B1.t, B2.t) Tools.case
val compare : Tools.CaseB.t -> Tools.CaseB.t -> int
end
module ListB :
functor (B : Base) ->
sig
type t = B.t list
val compare : Tools.ListB.t -> Tools.ListB.t -> int
end
module ArrayB :
functor (B : Base) ->
sig
type t = B.t array
val compare : Tools.ArrayB.t -> Tools.ArrayB.t -> int
end
module PairB :
functor (B1 : Base) ->
functor (B2 : Base) ->
sig
type t = B1.t * B2.t
val compare : Tools.PairB.t -> Tools.PairB.t -> int
end
module Pair2B :
functor (B1 : Base) ->
functor (B2 : Base) ->
sig
type t = B1.t * B2.t
val compare : Tools.Pair2B.t -> Tools.Pair2B.t -> int
end
module OptionB :
functor (B : Base) ->
sig
type t = B.t option
val compare : Tools.OptionB.t -> Tools.OptionB.t -> int
end
module ToItem : functor (B : Base) -> UnionFind.Item
module MakeUF :
functor (B1 : Base) ->
functor (B2 : Base) ->
sig
type item = (B1.t, B2.t) Tools.case
type descriptor
type accumulator = unit
type state
val initial : Tools.MakeUF.state
val representative :
Tools.MakeUF.item -> Tools.MakeUF.state -> Tools.MakeUF.item
val equivalent :
Tools.MakeUF.item ->
Tools.MakeUF.item -> Tools.MakeUF.state -> bool
val descriptor :
Tools.MakeUF.item ->
Tools.MakeUF.state -> Tools.MakeUF.descriptor
val set :
Tools.MakeUF.item ->
Tools.MakeUF.descriptor ->
Tools.MakeUF.state -> Tools.MakeUF.state
val union :
Tools.MakeUF.item ->
Tools.MakeUF.item ->
Tools.MakeUF.state ->
Tools.MakeUF.accumulator ->
Tools.MakeUF.state * Tools.MakeUF.accumulator
val domain : Tools.MakeUF.state -> Tools.MakeUF.item list
end
type ('a, 'b) bij = ('a -> 'b) * ('b -> 'a)
val mem : ('a -> 'b -> int) -> 'a -> 'b list -> bool
val mem2 : ('a -> 'b -> int) -> 'a -> ('b * 'c) list -> bool
val inser : ('a -> 'a -> int) -> 'a -> 'a list -> 'a list
val inserb : ('a -> 'a -> int) -> 'a -> 'a list -> 'a list option
val inter : ('a -> 'b -> int) -> 'a list -> 'b list -> bool
val makebij : 'a list -> ('a, int) Tools.bij
val conc : ('a -> 'a -> int) -> 'a list list -> 'a list
val ( @@ ) : 'a list -> 'a list -> 'a list
val bind : ('a -> 'a -> int) -> ('b -> 'a list) -> 'b list -> 'a list
val assoc : ('a -> 'a -> int) -> 'a -> ('a * 'b) list -> 'b
val assoc2 : ('a -> 'a -> int) -> 'a -> ('a * 'b) list -> 'b list
val makefuncnd :
(module Tools.Base with type t = 'a) ->
(module Tools.Base with type t = 'b) ->
('a * 'b * 'a) list -> 'a -> 'b -> 'a list
val makefuncd :
(module Tools.Base with type t = 'a) ->
(module Tools.Base with type t = 'b) ->
('a * 'b * 'a) list -> 'a -> 'b -> 'a option
val mappairs :
('a -> 'a -> int) ->
('b -> 'a * 'c) -> 'c list -> 'b list -> 'a list * 'c list
val ( == ) : 'a list -> 'a list -> bool
val ( ^^ ) : 'a list -> 'a list -> 'a list
val remove : ('a -> 'a -> int) -> 'a -> 'a list -> 'a list
val chrono : ('a -> 'b) -> 'a -> 'b
val fold_lefti : (int -> 'a -> 'b -> 'a) -> 'a -> 'b array -> 'a
end