MCPcopy Create free account
hub / github.com/comaps/comaps / ErrorsMade

Method ErrorsMade

libs/base/levenshtein_dfa.cpp:326–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326size_t LevenshteinDFA::ErrorsMade(State const & s) const
327{
328 size_t errorsMade = m_maxErrors;
329 for (auto const & p : s.m_positions)
330 {
331 if (!IsAccepting(p))
332 continue;
333 auto const errorsLeft = p.m_errorsLeft - (m_size - p.m_offset);
334 errorsMade = std::min(errorsMade, m_maxErrors - errorsLeft);
335 }
336 return errorsMade;
337}
338
339size_t LevenshteinDFA::PrefixErrorsMade(State const & s) const
340{

Callers 2

GetResultFunction · 0.45
UNIT_TESTFunction · 0.45

Calls

no outgoing calls

Tested by 2

GetResultFunction · 0.36
UNIT_TESTFunction · 0.36