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).
-
new()
Creates a new object which maintains internal storage areas for the LCS computation. Use one of these per concurrent LCS() call.
-
LCS(\@a,\@b)
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-2015 by Helmut Wollmersdorfer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.