From: "Michael J. Hennebry" <hennebry at plains.NoDak.edu>
It seems to me that you have a tree with labeled nodes, or at least labeled
leaves. Apparently the metric is only to be applied to tree with the same
set of labels. Try this metric:
dist(T1, T2)^2 = Sum (dfatca(T1, a, b)-dfatca(T2, a, b))^2
Where dfatca(T, a, b) is the distance in tree T, from labeled node a to
its common anscestor with labeled node b and the sum is over all pairs
of labeled nodes a and b in the trees.
This is harder to compute than the one I gave first, but I think that it would
be more useful. It's less sensitive to changes like the swapping of two
entire subtrees. Also the metric that I gave first will give a distance of
zero between two trees that differ only in their labeling.
Mike hennebry at plains.NoDak.edu
CMS is not posix compliant.