Class EditDistance

java.lang.Object
org.spockframework.runtime.condition.EditDistance

public class EditDistance extends Object
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 Details

  • Method Details

    • getMatrix

      public int[][] getMatrix()
    • getDistance

      public int getDistance()
    • getSimilarityInPercent

      public int getSimilarityInPercent()
    • calculatePath

      public List<EditOperation> calculatePath()