calculateLCS {runibic} | R Documentation |
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.
calculateLCS(discreteInput, useFibHeap = TRUE)
discreteInput |
is a input discrete matrix |
useFibHeap |
boolean value for choosing which sorting method should be used in sorting of output |
a list with sorted values based on calculation of the length of LCS between all pairs of rows
runibic
backtrackLCS
pairwiseLCS
A <- matrix(c(4, 3, 1, 2, 5, 8, 6, 7), nrow=2, byrow=TRUE) calculateLCS(A, TRUE)