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

org.simmetrics.Metric Maven / Gradle / Ivy

There is a newer version: 4.1.1
Show newest version
package org.simmetrics;

/**
 * Measures the similarity between two arbitrary objects of the same type . The
 * measurement results in a value between 0 and 1 inclusive. A value of zero
 * indicates that the sets are dissimilar, a value of 1 indicates they are
 * similar.
 * 

* The similarity measure should be consistent with equals such that * {@code a.equals(b) => compare(a,b) == 1.0}. * * @param * type of the elements compared * */ public interface Metric { /** * Measures the similarity between a and b. The measurement results in a * value between 0 and 1 inclusive. A value of {@code 0.0} indicates that a * and bare dissimilar, a value of {@code 1.0} indicates they are similar. * * @param a * object a to compare * @param b * object b to compare * @return a value between 0 and 1 inclusive indicating similarity */ public float compare(T a, T b); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy