Skip Menu |

This queue is for tickets about the Tree-Suffix CPAN distribution.

Report information
The Basics
Id: 18115
Status: resolved
Priority: 0/
Queue: Tree-Suffix

People
Owner: Nobody in particular
Requestors: ewijaya [...] singnet.com.sg
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.07
Fixed in: (no value)



Subject: Bug in Find/Match/Search Method?
Hi Gray, I tried this snippet below. There are few question I need to confirm with you. 1. All three methods - find, match, search - they have same functionalities right. 2. With the script below, especially when assigning the find/match/search method, you said that it should return the list of indices of sequence where the string occurs. But given the string "TTTT", the output returns $VAR = [ 1 ]; Which is wrong. I'm using: perl, v5.8.5 built for i386-linux-thread-multi Tree::Suffix Version 0.07 Linux localhost 2.6.8.1-12mdk #1 Fri Oct 1 12:53:41 CEST 2004 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz unknown GNU/Linux __BEGIN__ use strict; use Data::Dumper; use Carp; use Tree::Suffix; my @strings = qw ( TTTTGGGGGGGGGGGGGGGGG ATCGGGGGACCGTTCTCTCCCC ); my $tree = Tree::Suffix->new(@strings); my $string = 'TTTT'; my @lcs = $tree->lcs; my $bool1 = $tree->find($string); my @bool2 = $tree->match($string); my @bool3 = $tree->search($string); print "BOOL\n"; print Dumper \@bool2 ; print Dumper \@bool3 ; my @indices = $tree->strings; print Dumper \@indices ; __END__ -- Regards, Edward WIJAYA
Show quoted text
> 1. All three methods - find, match, search - > they have same functionalities right.
yes, they are aliases. Show quoted text
> 2. With the script below, especially > when assigning the find/match/search > method, you said that it should return > the list of indices of sequence where > the string occurs.
sorry, the documentation was updated before the code was ready. i'm almost finished with it, probably tomorrow.