package prbnmcn-clustering

  1. Overview
  2. Docs

Make takes as argument a module endowing sets of elements with the structure of a metric space.

Parameters

module S : Element_set

Signature

type cluster = {
  1. set : S.t;
    (*

    The set of elements corresponding to this cluster.

    *)
  2. tree : tree;
    (*

    The tree of subclusters contained in this cluster.

    *)
  3. merged_at : float;
    (*

    The distance between sub-clusters (0.0 in case tree = Leaf)

    *)
  4. uid : int;
}
and tree =
  1. | Node of cluster * cluster
  2. | Leaf
val cluster : S.elt list -> cluster
val cluster_with_initial : S.t list -> cluster
val truncate : cluster -> int -> S.t list

truncate c depth returns all the sub-clusters at depth depth. The depth of the root is 0.

val all_clusters : cluster -> (S.t * int) list

Returns all clusters along their depths.

OCaml

Innovation. Community. Security.