The Ultrametric Constraint and its Application to Phylogenetics