pairwiseLCS {runibic}R Documentation

Calculate a matrix of Longest Common Subsequence (LCS) between a pair of numeric vectors

Description

This function calculates the matrix with Longest Common Subsequence (LCS) between two numeric vectors. From given matrix we can locate the size of the Longest Common Subsequence in the last column in the last row.

Usage

pairwiseLCS(x, y)

Arguments

x

an integer vector

y

an integer vector

Value

a matrix computed using dynamic programming that stores the Longest Common Subsequence (LCS) between two vectors A and B.

See Also

runibic calculateLCS backtrackLCS

Examples

A <- c(1, 2, 3, 4, 5)
B <- c(1, 2, 4)
pairwiseLCS(A, B)


[Package runibic version 1.14.0 Index]