INNER CODE UNIT · Java

LevenshteinUtils

robinhood/ticker · ticker/src/main/java/com/robinhood/ticker/LevenshteinUtils.java:27

public class LevenshteinUtils {
    static final int ACTION_SAME = 0;
    static final int ACTION_INSERT = 1;
    static final int ACTION_DELETE = 2;

    /**
     * This is a wrapper function around {@link #appendColumnActionsForSegment} that
     * additionally takes in supportedCharacters. It uses supportedCharacters to compute whether
     * the current character should be animated or if it should remain in-place.
     *
     * For specific implementation details, see {@link #appendColumnActionsForSegment}.
     *
     * @param source the source char array to animate from
     * @param target the target char array to animate to
     * @param supportedCharacters all characters that support custom animation.
     * @return an int array of size min(source.length, target.length) where each index
     *         corresponds to one of {@link #ACTION_SAME}, {@link #ACTION_INSERT},
     *         {@link #ACTION_DELETE} to represent if we update, insert, or delete a character

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…