package prbnmcn-clustering

  1. Overview
  2. Docs

Make takes as first argument a module E : Element of elements admitting the structure of a metric space. The second argument of Make is a module endowing sets of elements with the structure of a metric space.

Parameters

module E : Intf.Metric
module S : Element_set with type elt = E.t

Signature

type cluster = {
  1. set : S.t;
  2. tree : tree;
  3. uid : int;
}
and tree =
  1. | Node of cluster * cluster
  2. | Leaf
val cluster : E.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.