Class EditDistance
java.lang.Object
org.spockframework.runtime.condition.EditDistance
Calculates Levenshtein distance and corresponding edit path between two character sequences.
Inspired from: http://etorreborre.blogspot.com/2008/06/edit-distance-in-scala_245.html
Ideas for improvements:
- Favor fewer EditOperationS when calculating distance and/or path
- Use algorithm with lower time and/or space complexity
- Author:
- Peter Niederwieser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
int[][]
int
-
Constructor Details
-
EditDistance
-
-
Method Details
-
getMatrix
public int[][] getMatrix() -
getDistance
public int getDistance() -
getSimilarityInPercent
public int getSimilarityInPercent() -
calculatePath
-