LCS::BV - Bit Vector (BV) implementation of the Longest Common Subsequence (LCS) Algorithm
use LCS::BV; $alg = LCS::BV->new; @lcs = $alg->LCS(\@a,\@b);
LCS::BV implements Algorithm::Diff using bit vectors and is faster in most cases, especially on strings with a length shorter than the used wordsize of the hardware (32 or 64 bits).
Creates a new object which maintains internal storage areas for the LCS computation. Use one of these per concurrent LCS() call.
Return the length of a Longest Common Subsequence, taking two arrayrefs as method arguments. It returns an integer.
Finds a Longest Common Subsequence, taking two arrayrefs as method arguments. It returns an array reference of corresponding indices, which are represented by 2-element array refs.
None by design.
Algorithm::Diff
Helmut Wollmersdorfer <helmut.wollmersdorfer@gmail.com>
Copyright 2014-2019 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::BV, copy and paste the appropriate command in to your terminal.
cpanm
cpanm LCS::BV
CPAN shell
perl -MCPAN -e shell install LCS::BV
For more information on module installation, please visit the detailed CPAN module installation guide.