MCPcopy Index your code
hub / github.com/TheAlgorithms/Rust / calc_match_shift

Function calc_match_shift

src/string/boyer_moore_search.rs:37–49  ·  view source on GitHub ↗

Calculates the shift when a full match occurs in the Boyer-Moore algorithm. It uses the bad character table to determine how much to shift the pattern. # Arguments `shift` - The current shift of the pattern on the text. `pat_len` - The length of the pattern. `text_len` - The length of the text. `bad_char_table` - The bad character table built for the pattern. `text` - The text as a slice of chara

(
    shift: isize,
    pat_len: isize,
    text_len: isize,
    bad_char_table: &HashMap<char, isize>,
    text: &[char],
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

boyer_moore_searchFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected