
public class ModifiedBerghelRoachEditDistance extends Object implements GeneralEditDistance
| Modifier and Type | Method and Description |
|---|---|
ModifiedBerghelRoachEditDistance |
duplicate()
Creates a duplicate (clone) of this distance engine, typically
in order to use it in another thread (as the GeneralEditDistance
contract does not specify thread safety).
|
int |
getDistance(CharSequence targetSequence,
int limit)
Computes edit distance from the pattern string (used to
construct this GeneralEditDistance instance) to a given target
string, bounded by a limit of interest.
|
static ModifiedBerghelRoachEditDistance |
getInstance(CharSequence pattern)
Creates an instance for computing edit distance from
pattern. |
static ModifiedBerghelRoachEditDistance |
getInstance(String pattern)
Creates an instance for computing edit distance from
pattern. |
public static ModifiedBerghelRoachEditDistance getInstance(CharSequence pattern)
pattern.pattern - string from which distances are measuredpublic static ModifiedBerghelRoachEditDistance getInstance(String pattern)
pattern.pattern - string from which distances are measuredpublic ModifiedBerghelRoachEditDistance duplicate()
GeneralEditDistanceduplicate in interface GeneralEditDistancepublic int getDistance(CharSequence targetSequence, int limit)
GeneralEditDistancegetDistance in interface GeneralEditDistancetargetSequence - string for which distance is to be compared
against a predefined patternlimit - maximum distance for which exact result is
required (and beyond which any over-limit result
can be returned)Copyright © 2018. All rights reserved.