Implements a family of functions for strings that finds a distance by optimizing their alignment in terms of the aggregate cost of edit operations (replacing one character for another, i.e. aligning them, and inserting or deleting characters, i.e. shifting alignment). The class implements the classical dynamic programming algorithm for finding the minimum string edit distance, and has parameterizable cost functions (using function interfaces defined in programming5.math). Currently, there are three pre-defined modes:
DEFAULT: By default, all edit operations cost one unit (1) each; the distance will thus be the total count of edit operations (e.g. "assert" and "dessert" have a distance of 2, for one insertion and one replacement). This mode is case sensitive.
ALPHABETIC_REPLACE: Reduces the cost of character replacements between alphabetic characters, relative to the inverse distance between them in the alphabet. Insertions and deletions have an average cost with respect to the distribution of replacement costs (this ensures that these operations are favored over replacements for "far" character pairs). This mode will produce distances that are not well defined for strings containing non-alphabetic characters, and is not case sensitive.
KEYBOARD_REPLACE: Reduces the cost of character replacements for pairs that are "close" in terms of their distance on the keyboard (uses the @link{programming5.strings.KeyboardCharDistanceFunction}). "Far" replacements, as well as insertions and deletions, are still given a unit (1) cost. This mode is case sensitive.
@author Andres Quiroz Hernandez
@version 6.9