实现课本中提到四个字符串匹配算法。
- BruteForce (30min)
- KarpRabinImpl (30min)
- KMPImpl (5 hour)
- BoyerMooreImpl (5 hour)
feel free to modify MatherTest.cpp & Matcher.h & Makefile
- 阅读Matcher.h 以及 MatcherTest.cpp了解所待实现类的要求和用法。
- 阅读Makefile, TA为你实现了
make (BF | KR | KMP | BM)以及数据生成make genData - 实现XImpl之后,对其测试。 比如 , 用
make KMP来对其进行测试。 - 修改MatcherTest, 完善该测试!
- 3-4重复完成4个实现
- TA做了简单 MatcherTest 测时间功能。 请结合课本比较四个算法的运行效率。
- 设计更合理的数据,完善profile的代码,对4个算法进行比较。