C++实现了4个经典的字符串模式匹配算法:BF、RK、KMP和BM,并用Qt6完成了GUI。为了便于直观有效地对4个算法进行测试和对比,设计了3种测试模式:
1. 单处理;
使用一个测试数据对单个算法进行测试,查看耗时以及结果是否正确;
2. 批处理1;
使用整个数据集对单个算法进行测试,对比不同数据量的耗时;
3. 批处理2:
使用一个测试数据对4个算法进行测试,对比不同算法的耗时。
测试文件老是上传失败,需要的朋友自己从link.txt中提供的链接下载。
下面的图片除了第1张为程序结构图,其余均是程序截图或生成的坐标图。
Machine Translation Contents with a Little Personal Polished:
Four classical string pattern matching algorithms: BF, RK, KMP and BM are implemented using C++ and GUI is completed by Qt6. What's more, In order to test and compare the four algorithms intuitively and effectively, three test modes are designed:
Single Mode:
Use single testbench to test one algorithm, and then to check the time-consuming and whether the results are correct;
Batch Mode 1:
Use the whole data set to test a single algorithm, and then compare the time-consuming over different amounts of data;
Batch Mode 2:
Use single testbench to test the four algorithms, and then compare the time-consuming of each algorithms.
If you need the testbench used during development, please download them yourself from the link provided in link.txt.
The following pictures except the first one is the program structure diagram than the rest are program screenshots or generated coordinates.