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

com.github.liblevenshtein.distance.IDistance Maven / Gradle / Ivy

There is a newer version: 3.0.1
Show newest version
package com.github.liblevenshtein.distance;

import java.io.Serializable;

/**
 * Specifies the interface that all distance functions must implement.
 * @author Dylon Edwards
 * @param  Type of the term whose distance is being determined.
 * @since 2.1.0
 */
public interface IDistance extends Serializable {

  /**
   * Finds the distance between two terms, {@code v} and {@code w}. The distance
   * between two terms is complemented by their similarity, which is determined
   * by subtracting their distance from the maximum distance they may be apart.
   * @param v Term to compare with {@code w}
   * @param w Term to compare with {@code v}
   * @return Distance between {@code v} and {@code w}
   */
  int between(Term v, Term w);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy