boyermoore.h
来自「多种字符串匹配算法 多种字符串匹配算法」· C头文件 代码 · 共 31 行
H
31 行
// 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 + =
减小字号Ctrl + -
显示快捷键?