2013年10月12日

摘要: 字符串匹配算法方法一:朴素法:扫描待匹配字符串找出所有匹配子字符串,方法简单直接,这里省略代码方法二:字符串匹配之rabin karp算法用到的结论:(X*Y)%Q = ((X%Q)*Y)%Q/*Filename:rabin_karp_matcher.cpp */#include#include#includeusing namespace std;int chartoint(char in){//字符转换成数字函数 int m = in - '0'; return m;}void rabin_karp_matcher(char *t,char*p,int d,int q){/ 阅读全文
posted @ 2013-10-12 17:29 程序猿猿猿 阅读(275) 评论(0) 推荐(0) 编辑

导航