INNER CODE UNIT · Java

fillWithActions

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

    private static void fillWithActions(List<Integer> actions, int num, int action) {
        for (int i = 0; i < num; i++) {
            actions.add(action);
        }
    }

    /**
     * Run a slightly modified version of Levenshtein distance algorithm to compute the minimum
     * edit distance between the current and the target text within the start and end bounds.
     * Unlike the traditional algorithm, we force return all {@link #ACTION_SAME} for inputs that
     * are the same length (so optimize update over insertion/deletion).
     *
     * @param columnActions the target list to append actions into
     * @param source the source character array
     * @param target the target character array
     * @param sourceStart the start index of source to compute column actions (inclusive)
     * @param sourceEnd the end index of source to compute column actions (exclusive)
     * @param targetStart the start index of target to compute column actions (inclusive)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…