LCS::Tiny - Tiny implementation of the Longest Common Subsequence (LCS) Algorithm
use LCS::Tiny; $alg = LCS::Tiny->new; $lcs = $alg->LCS(\@a,\@b);
LCS::Tiny is a heavily tuned version based on Algorithm::Diff
Creates a new object which maintains internal storage areas for the LCS computation. Use one of these per concurrent LCS() call.
Finds a Longest Common Subsequence, taking two arrayrefs as method arguments. It returns a list of corresponding indices, which are represented by 2-element array refs.
None by design.
Algorithm::Diff
James W. Hunt and Thomas G. Szymanski. A fast algorithm for computing longest common subsequences. Communications of the ACM, 20(5):350-353, 1977.
Hunt, J.W. and McIlroy, M.D. An Algorithm for Differential File Comparison. Computing Science Technical Report 41, Bell Laboratories (1975).
Helmut Wollmersdorfer <helmut.wollmersdorfer@gmail.com>
Copyright 2014-2015 by Helmut Wollmersdorfer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install LCS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm LCS
CPAN shell
perl -MCPAN -e shell install LCS
For more information on module installation, please visit the detailed CPAN module installation guide.