sig
  module type OrderedType =
    sig
      type t
      val compare :
        Distributions.Categorical.OrderedType.t ->
        Distributions.Categorical.OrderedType.t -> int
    end
  module type S =
    sig
      type elt
      type t
      val sample : ?rng:Gsl.Rng.t -> size:int -> t -> elt array
      val cumulative_probability : t -> n:elt -> float
      val probability : t -> n:elt -> float
      val create : (elt * float) array -> t
      val mle : elt array -> t
    end
  module Make :
    functor (Elt : Map.OrderedType->
      sig
        type elt = Elt.t
        type t
        val sample : ?rng:Gsl.Rng.t -> size:int -> t -> elt array
        val cumulative_probability : t -> n:elt -> float
        val probability : t -> n:elt -> float
        val create : (elt * float) array -> t
        val mle : elt array -> t
      end
end