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

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

There is a newer version: 3.0.0
Show newest version
package com.github.dylon.liblevenshtein.levenshtein.distance;

import java.io.Serializable;

/**
 * Specifies the interface that all distance functions must implement.
 * @param  Type of the term whose distance is being determined.
 * @author Dylon Edwards
 * @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