The minimun bound for number of edits is the size difference between the 2 arrays.
If MaxEditDistance is smaller than this, we can bail out early without needing to traverse any of the arrays.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
Comment Actions
Could be unit tested with a counting map functor? Though I'm not sure that's strictly necessary/worthwhile, up to you.
Comment Actions
Looks good, thanks!
llvm/unittests/ADT/EditDistanceTest.cpp | ||
---|---|---|
35–36 ↗ | (On Diff #434755) | Generally prefer implicit construction over explicit where they're both valid - since implicit is strictly less powerful. |