C++实现BF、RK、KMP和BM~Qt6完成GUI

2022/7/6 14:25:14

本文主要是介绍C++实现BF、RK、KMP和BM~Qt6完成GUI,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

  项目


  用C++实现了4个经典的字符串模式匹配算法:BFRKKMPBM,并用Qt6完成了GUI。为了便于直观有效地对4个算法进行测试和对比,设计了3种测试模式:

  1. 单处理;

    使用一个测试数据对单个算法进行测试,查看耗时以及结果是否正确;

  2. 批处理1

    使用整个数据集对单个算法进行测试,对比不同数据量的耗时;

  3. 批处理2

    使用一个测试数据对4个算法进行测试,对比不同算法的耗时。



  需要测试文件的朋友可以自己从链接下载。


  PS:合肥工业大学《程序设计与算法训练》(即《数据结构》课程设计)的题目“字符串模式匹配算法比较”可以参考本项目。(毕业老学长奉上,蛤蛤蛤!)

  下面的图片除了第1张为程序结构图,其余均是程序截图或生成的坐标图。


  Machine Translation Contents with a Little Personal Polished:


  Project


  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.


















































































这篇关于C++实现BF、RK、KMP和BM~Qt6完成GUI的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程