|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.linguistics.search.StringSearch
org.jscience.linguistics.search.BNDM
org.jscience.linguistics.search.BNDMWildcards
public class BNDMWildcards
An implementation of the BNDM algorithm with wildcards ("don't care"
symbols). The wildcard character is initially '?', but any character can be
used through the processChars(char[],char) and the (byte[], byte) methods.
This algorithm is around five times faster than ShiftOrWildcards.
Preprocessing: O(2m + ∑) time
processBytes(byte[],byte),
processChars(char[],char),
BNDM| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jscience.linguistics.search.StringSearch |
|---|
StringSearch.Dispatch, StringSearch.ReflectionDispatch |
| Field Summary | |
|---|---|
static char |
wildcard
The wildcard character (initially '?'). |
| Fields inherited from class org.jscience.linguistics.search.StringSearch |
|---|
activeDispatch, useNative |
| Constructor Summary | |
|---|---|
BNDMWildcards()
Constructor for BNDMWildcards. |
|
| Method Summary | |
|---|---|
java.lang.Object |
processBytes(byte[] pattern)
Pre-processing of the pattern. |
java.lang.Object |
processBytes(byte[] pattern,
byte w)
Pre-processing of the pattern. |
java.lang.Object |
processChars(char[] pattern)
Pre-processes the pattern. |
java.lang.Object |
processChars(char[] pattern,
char w)
Pre-processes the pattern. |
java.lang.Object |
processString(java.lang.String pattern,
char w)
Pre-processes the pattern. |
| Methods inherited from class org.jscience.linguistics.search.BNDM |
|---|
searchBytes, searchChars |
| Methods inherited from class org.jscience.linguistics.search.StringSearch |
|---|
createCharIntMap, createCharIntMap, equals, hashCode, index, processString, searchBytes, searchBytes, searchBytes, searchBytes, searchBytes, searchChars, searchChars, searchChars, searchChars, searchChars, searchString, searchString, searchString, searchString, searchString, searchString, toString, toStringBuffer, usesNative, usesReflection |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static char wildcard
| Constructor Detail |
|---|
public BNDMWildcards()
| Method Detail |
|---|
public java.lang.Object processBytes(byte[] pattern)
wildcard field.
processBytes in class BNDMpattern - DOCUMENT ME!
StringSearch.processBytes(byte[]),
processBytes(byte[],byte)
public java.lang.Object processBytes(byte[] pattern,
byte w)
int array.
pattern - the byte array containing the pattern, may
not be nullw - the wildcard byte character
int arraypublic java.lang.Object processChars(char[] pattern)
wildcard field.
processChars in class BNDMpattern - the char array containing the pattern, may
not be null
CharIntMapStringSearch.processChars(char[]),
processChars(char[],char)
public java.lang.Object processChars(char[] pattern,
char w)
CharIntMap.
pattern - the char array containing the pattern, may
not be nullw - the wildcard character
CharIntMap.
public java.lang.Object processString(java.lang.String pattern,
char w)
CharIntMap.
pattern - the String array containing the pattern, may not be
nullw - the wildcard character
CharIntMap.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||