public abstract class MyersBitParallelEditDistance extends Object implements GeneralEditDistance, Cloneable
Modifier | Constructor and Description |
---|---|
protected |
MyersBitParallelEditDistance(CharSequence s)
Constructs a distance calculator for a given string.
|
Modifier and Type | Method and Description |
---|---|
protected Object |
clone() |
GeneralEditDistance |
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).
|
abstract int |
getDistance(CharSequence s,
int k)
Computes distance from the pattern to a given string, bounded by
a limiting distance @see(GeneralEditDistance.getDistance(CharSequence,int)).
|
static MyersBitParallelEditDistance |
getInstance(CharSequence s)
Chooses an appropriate implementation for a given pattern string.
|
static void |
main(String[] args)
Tests a computation manually.
|
protected void |
perThreadInit()
Initializes items that cannot be shared among threads.
|
protected MyersBitParallelEditDistance(CharSequence s)
public static MyersBitParallelEditDistance getInstance(CharSequence s)
s
- pattern stringpublic static void main(String[] args)
public GeneralEditDistance duplicate()
GeneralEditDistance
duplicate
in interface GeneralEditDistance
public abstract int getDistance(CharSequence s, int k)
getDistance
in interface GeneralEditDistance
s
- string for which distance is to be compared
against a predefined patternk
- maximum distance for which exact result is
required (and beyond which any over-limit result
can be returned)protected Object clone() throws CloneNotSupportedException
CloneNotSupportedException
protected void perThreadInit()
Copyright © 2018. All rights reserved.