All Downloads are FREE. Search and download functionalities are using the official Maven repository.

smile.math.distance.Distance Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
/******************************************************************************
 *                   Confidential Proprietary                                 *
 *         (c) Copyright Haifeng Li 2011, All Rights Reserved                 *
 ******************************************************************************/

package smile.math.distance;

/**
 * An interface to calculate a distance measure between two objects. A distance
 * function maps pairs of points into the nonnegative reals and has to satisfy
 * 
    *
  • non-negativity: d(x, y) ≥ 0 *
  • isolation: d(x, y) = 0 if and only if x = y *
  • symmetry: d(x, y) = d(x, y) *
. * Note that a distance function is not required to satisfy triangular inequality * |x - y| + |y - z| ≥ |x - z|, which is necessary for a metric. * * @author Haifeng Li */ public interface Distance { /** * Returns the distance measure between two objects. */ public double d(T x, T y); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy