Boyer

编程入门 行业动态 更新时间:2024-10-13 16:15:24
本文介绍了Boyer-moore算法的实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在实验中,我们使用了一台装有IntelPentium®4 2.4 GHz处理器的PC,L1高速缓存为8KB,L2高速缓存为512KB,RAM为512MB.主机操作系统是Windows®XP Professional.使用的编译器是Microsoft®Visual C ++ 6.0. 如何获得图形条款的性能结果? 1.特定输入 2.随机输入.

Hi, In the experiments we used a PC with Intel Pentium® 4 2.4 GHz processor, with L1 cache of 8KB and L2 cache of 512KB, and 512MB of RAM. The host operating system is Windows® XP professional. The compiler used is Microsoft® Visual C++ 6.0. HOW TO GET THE PERFORMANCE RESULTS IN TERMS OF GRAPH? 1. SPECIFIC INPUT 2. RANDOM INPUT. WHATS THE PROCEDURE?

推荐答案

通常,要研究算法的性能,您应该首先实现该算法,而不是实现一个可以实现此功能的函数. -查询计时器 -调用算法,为其提供所需的测试数据 -再次查询计时器 两个查询的值之间的差是经过的时间. 关于计时器,您可以在此处资助一些有用的文章 www.codeproject/info/search.aspx?artkw=high+ resolution + timer [^ ] 或通过Google"Windows高分辨率计时器". 要绘制图形,您必须重复该过程多次,传递不同类型的数据(或调用不同的算法实现)以得出一系列数字". 可以这样做: -手动,更改数据后多次调用测试程序,然后将数字粘贴到电子表格中(如excel)并生成图形, -通过使测试程序能够执行重复调用并将结果保存在文本文件中(您稍后将其导入电子表格)来半自动进行 -通过编写一个测试程序自动执行,该程序还以图形形式显示数据(如果您不知道图形在Windows上的工作方式,则更复杂,通常不适合作为便携式测试",但肯定更适合场景测试" ) In general, to study the performance of an algorithm you should fist implement the algorithm and than implement a function that - queries a timer - call the algorithm giving it the required testing data - queries the timer (again) The difference between the values of the two queries is the elapsed. About timers, you can fund some useful articles here www.codeproject/info/search.aspx?artkw=high+resolution+timer[^] or by google "windows high resolution timer". To come to a graph, you have to repeat that process a number of times, passing different type of data (or calling different algotithm implementations) to came to a "series of numbers". This can be done: - manually, calling the testing program many times after changing the data, then pasting the number into a spreadsheet (like excel) and produce a graph, - semiautomatically by making the testing program able to do the repeated calls and save the results in a text file (that you will later import into a spreadsheet) - Automatically by writing a testing program that also displays the data in the form of a graph (more complex, if you are unaware of how graphics work on windows, and in general not suitable as a "portable test", but certainly more "scenographic")

哪些表演?你到底卡住了什么?您可以对问题进行一些改进,以使其不是通用的吗? Which performances ? With what are you stuck exactly ? Could you refine a bit your question so that it is not that generic ?

字符串text:aaaa ... a 模式:aaaa ... a ??????????????? string text:aaaa...a pattern:aaaa...a ??????????????

更多推荐

Boyer

本文发布于:2023-11-30 09:05:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1649457.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Boyer

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!