Patience

diffson.lcs.Patience
class Patience[T](withFallback: Boolean)(implicit evidence$1: Eq[T]) extends Lcs[T]

Implementation of the patience algorithm [1] to compute the longest common subsequence

[1] http://alfedenzo.livejournal.com/170301.html

Value parameters

withFallback

whether to fallback to classic LCS when patience could not find the LCS

Attributes

Source
Patience.scala
Graph
Supertypes
class Lcs[T]
class Object
trait Matchable
class Any

Members list

Type members

Types

type Occurrence = (T, Int)

An occurrence of a value associated to its index

An occurrence of a value associated to its index

Attributes

Source
Patience.scala

Value members

Concrete methods

def lcs(s1: List[T], s2: List[T], low1: Int, high1: Int, low2: Int, high2: Int): List[(Int, Int)]

Computes the longest common subsequence between both sequences.

Computes the longest common subsequence between both sequences. It is encoded as the list of common indices in the first and the second sequence.

Attributes

Source
Patience.scala
def savedHashes: Lcs[T]

Returns an instance of this Lcs algorithm that precomputes and store hashes of elements to diff.

Returns an instance of this Lcs algorithm that precomputes and store hashes of elements to diff.

Attributes

Source
Patience.scala

Inherited methods

def lcs(seq1: List[T], seq2: List[T]): List[(Int, Int)]

Computes the longest commons subsequence between both inputs.

Computes the longest commons subsequence between both inputs. Returns an ordered list containing the indices in the first sequence and in the second sequence.

Attributes

Inherited from:
Lcs
Source
Lcs.scala