Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: searching for a pattern using suffix arrays (better)

by tye (Sage)
on Oct 09, 2013 at 02:46 UTC ( #1057474=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        $mid = int( ( $lo + $hi ) / 2 );
        if ( $hi == $lo ) { return $mid }
    
  2. or download this
        return $hi
            if  $hi == $lo;
        $mid = int( ( $lo + $hi ) / 2 );
    
  3. or download this
        if ( $suff[ $indices[ $index ] ] =~ /^$pattern/ ) {
            push @positions, $indices[ $index ] + 1;
    ...
        else {
            last;
        }
    
  4. or download this
        last
            if  $suff[ $indices[ $index ] ] !~ /^$pattern/;
        push @positions, $indices[ $index ] + 1;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1057474]
help
Chatterbox?
[Corion]: Except that it doesn't work ...
[Lady_Aleena]: cPanel is a sponsor of meta::cpan?
[Lady_Aleena]: The default perl on the version of cPanel my web hosts uses is 5.8.8 which means I am dreadfully behind. I doubt perl 6 will hit my web host in my lifetime.

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2017-05-29 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?