C++实现BF、RK、KMP和BM~Qt6完成GUI
作者:互联网
用C++实现了4个经典的字符串模式匹配算法:BF、RK、KMP和BM,并用Qt6完成了GUI。为了便于直观有效地对4个算法进行测试和对比,设计了3种测试模式:
1. 单处理;
使用一个测试数据对单个算法进行测试,查看耗时以及结果是否正确;
2. 批处理1;
使用整个数据集对单个算法进行测试,对比不同数据量的耗时;
3. 批处理2:
使用一个测试数据对4个算法进行测试,对比不同算法的耗时。
需要测试文件的朋友可以自己从链接下载。
下面的图片除了第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.
The following pictures except the first one is the program structure diagram than the rest are program screenshots or generated coordinates.
标签:Qt6,BF,BM,算法,algorithms,测试,test 来源: https://www.cnblogs.com/25th-engineer/p/16448780.html