开发者

Are these algorithm implemented in Objective-C Libraries?

I want to know, Are these algorithms开发者_Python百科 implemented in Objective-C Libraries for text search?

  1. Knutt-Morri-Pratt
  2. Boyer-Moore
  3. finite automata


Looking at the source for CFStringFindWithOptionsAndLocale in CFString.c, it seems like it only implements naive search. Depending on how huge the text is, you might actually get away with this.

Regardless, if your passage is sufficiently huge, Boyer-Moore and KMP are still linear time (albeit with a smaller constant factor), you might want to look at implementing a simple disk based full text index. I've done it for a client's project and it really isn't as hard as it sounds.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜