Algorithm-LCSS

 view release on metacpan or  search on metacpan

html/LCSS.html  view on Meta::CPAN

<HTML>
<HEAD>
<TITLE>LCSS.pm</TITLE>
<LINK REL="stylesheet" HREF="../html/docs.css" TYPE="text/css">
<LINK REV="made" HREF="mailto:">
</HEAD>

<BODY>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<FONT SIZE=+1><STRONG><P CLASS=block>&nbsp;LCSS.pm</P></STRONG></FONT>
</TD></TR>
</TABLE>

<A NAME="__index__"></A>
<!-- INDEX BEGIN -->

<UL>

    <LI><A HREF="#name">NAME</A></LI>
    <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
    <LI><A HREF="#description">DESCRIPTION</A></LI>
    <LI><A HREF="#methods">METHODS</A></LI>
    <UL>

        <LI><A HREF="#lcss">LCSS</A></LI>
        <LI><A HREF="#css">CSS</A></LI>
        <LI><A HREF="#css_sorted">CSS_Sorted</A></LI>
    </UL>

    <LI><A HREF="#export">EXPORT</A></LI>
    <LI><A HREF="#author">AUTHOR</A></LI>
    <LI><A HREF="#see also">SEE ALSO</A></LI>
</UL>
<!-- INDEX END -->

<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P>Algorithm::LCSS - Perl extension for getting the Longest Common Sub-Sequence</P>
<P>
<HR>
<H1><A NAME="synopsis">SYNOPSIS</A></H1>
<PRE>
    use Algorithm::LCSS qw( LCSS CSS CSS_Sorted );
    my $lcss_ary_ref = LCSS( \@SEQ1, \@SEQ2 );  # ref to array
    my $lcss_string  = LCSS( $STR1, $STR2 );    # string
    my $css_ary_ref = CSS( \@SEQ1, \@SEQ2 );    # ref to array of arrays
    my $css_str_ref = CSS( $STR1, $STR2 );      # ref to array of strings
    my $css_ary_ref = CSS_Sorted( \@SEQ1, \@SEQ2 );  # ref to array of arrays
    my $css_str_ref = CSS_Sorted( $STR1, $STR2 );    # ref to array of strings</PRE>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P>This module uses Algoritm::Diff to implement LCSS and is orders of magnitude
faster than String::LCSS.</P>
<P>If you pass the methods array refs you get back array (ref) format data. If
you pass strings you get a string or a ref to an array of strings.</P>
<P>
<HR>
<H1><A NAME="methods">METHODS</A></H1>
<P>
<H2><A NAME="lcss">LCSS</A></H2>
<P>Returns the longest common sub sequence. If there may be more than one (with



( run in 2.368 seconds using v1.01-cache-2.11-cpan-cdf2f3d4e48 )