[Haskell-cafe] FGL/Haskell and Hierarchical Clustering/dendograms

Ketil Malde ketil at malde.org
Wed Dec 23 06:53:18 EST 2009

Nikolas Borrel-Jensen <nikolasborrel at gmail.com> writes:

> I have very hard to see, how this could be done efficiently without pointers
> (as in C). I have thought of just saving the nodes from the start of the
> root path, and traversing it, but a lot of searching should be done all the
> time.

I must admit I didn't follow your examples.  But when I implemented
single linkage clustering, I maintained a list of current clusters.
Each cluster held a Set of its nodes, and traversing the list of edges
from least cost to greatest, the clusters containing the end points of
each edge was identified, and, if different, merged.

It's probably possible to do it more efficiently, but I don't think it's
too bad.

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list