Interpretiing agglomerative tree/dendogram


I want to use the agglomerative tree output computed by cluto, and recompute/redraw the dendogram in another application. But I am unable to figure out how exactly the tree is computed. I am able to easily distinguish the structure of the node connections (parent-childs) but unable to understand how distances are calculated. My understanding is that "The length of the branch indicates the distance between the subgroups/clusters when they are joined", but how the distances are used here in cluto, I am unable to figure out yet.

"CLUTO’s tree ?le also outputs two numbers for each internal node the tree. The ?rst number is the average similarity between the siblings of each tree node, .... The second number is the change in the value of the criterion function achieved by combining the particular pair of clusters", as written in Cluto's manual.. I have been trying to use these numbers so that I can reconstruct the tree, but not any success as yet.

I hope you can help me out. Its quite vital for my research to proceed.