|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdataloader.KMP
public class KMP
This is a straightforward implementation of the famous Knuth-Morris-Pratt algorithm for string-matching. We use this to algorithm to find the indices where each news in the HTML files starts.
Constructor Summary | |
---|---|
KMP()
|
Method Summary | |
---|---|
int[] |
kmp(java.lang.String text,
java.lang.String pattern)
KMP is not a particularily fast algorithm in practice, but it achieves an linear upper bound complexity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KMP()
Method Detail |
---|
public int[] kmp(java.lang.String text, java.lang.String pattern)
text
- pattern
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |