|Did you know ...||Search Documentation:|
|Pack lcs -- prolog/lcs.pl|
Compute a longest common subsequence between two lists. Elements can be compared by means of an arbitrary similarity metric.
Bare can be common if
Implemented in terms of lcs/5.
A-Bsince Cmp allows non-identical elements to be considered common.
Elements of As and Bs are compared by
Similarity values indicate more similar elements.
Length is the sum of similarity scores for elements in the
Implemented with memoization on top of a naive, exponential algorithm. It performs fairly well, but patches to use a better algorithm are welcome.
A == B, otherwise 0. This predicate is helpful as the first argument to lcs/5.