Interface _charDistance

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public interface _charDistance
Function type that calculates the distance or difference or cost between two given characters.

This is useful mostly for string procedure algorithms (e.g. Levenshtein distance).

  • Method Summary

    Modifier and Type Method Description
    float distance​(char a, char b)
    Calculates the distance of the two given characters.
  • Method Details

    • distance

      float distance​(char a, char b)
      Calculates the distance of the two given characters.

      The meaning of the returned value depends on the function implementation and/or the context it is used in.
      Typical string similarity values range from 0.0 to 1.0 .

      Parameters:
      a - the first character
      b - the second character
      Returns:
      the distance/difference/cost of the two given characters.