⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 boyermoore.h

📁 多种字符串匹配算法 多种字符串匹配算法
💻 H
字号:
// BoyerMoore.h: interface for the BoyerMoore class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(_BOYERMOORE_H__)
#define _BOYERMOORE_H__

//The Boyer-Moore algorithm is considered as the most efficient 
//string-matching algorithm in usual applications. A simplified 
//version of it or the entire algorithm is often implemented in 
//text editors for the <search> and <substitute> commands.

#include "MatchingString.h"

class BoyerMoore : public MatchingString  
{
public:
	BoyerMoore();
	virtual ~BoyerMoore();

	static void test();
	void search();//char *x, int m, char *y, int n

private:
	void preBmBc(char *x, int m, int bmBc[]);
	void suffixes(char *x, int m, int *suff);
	void preBmGs(char *x, int m, int bmGs[]);
};

#endif // !defined(_BOYERMOORE_H__)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -