calculateLCS {runibic}R Documentation

Calculate all Longest Common Subsequences between a matrix.

Description

This function computes unique pairwise Longest Common Subsequences between each row of input matrix. The function outputs a list sorted by Longest Common Subsequences (LCS) length. The output list contains the length of calculated LCS, indices, of the first and second rows between which LCS was calculated. The function uses two different sorting methods. The default one uses Fibonacci Heap used in original implementation of Unibic, the second one uses standard sorting algorithm from C++ STL.

Usage

calculateLCS(discreteInput, useFibHeap = TRUE)

Arguments

discreteInput

is a input discrete matrix

useFibHeap

boolean value for choosing which sorting method should be used in sorting of output

Value

a list with sorted values based on calculation of the length of LCS between all pairs of rows

See Also

runibic backtrackLCS pairwiseLCS

Examples

A <- matrix(c(4, 3, 1, 2, 5, 8, 6, 7), nrow=2, byrow=TRUE)
calculateLCS(A, TRUE)

[Package runibic version 1.2.5 Index]