Ultrametric and Generalized Ultrametric in Computational Logic and in Data Analysis