List::Search 0.3
Sponsored Links
List::Search 0.3 Ranking & Summary
File size:
0.005 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
821
Date added:
2007-07-27
Publisher:
Edmund von der Burg
List::Search 0.3 description
List::Search is a Perl module for fast searching of sorted lists.
SYNOPSIS
use List::Search qw( list_search nlist_search custom_list_search );
# Create a list to search
my @list = sort qw( bravo charlie delta );
# Search for a value, returns the index of first match
print list_search( alpha, @list ); # 0
print list_search( charlie, @list ); # 1
print list_search( zebra, @list ); # -1
# Search numerically
my @numbers = sort { $a <=> $b } ( 10, 20, 100, 200, );
print nlist_search( 20, @numbers ); # 2
# Search using some other comparison
my $cmp_code = sub { lc( $_[0] ) cmp lc( $_[1] ) };
my @custom_list = sort { $cmp_code->( $a, $b ) } qw( FOO bar BAZ bundy );
print list_search_generic( $cmp_code, foo, @custom_list );
This module lets you quickly search a sorted list. It will return the index of the first entry that matches, or if there is no exact matches then the first entry that is greater than the search key.
For example in the list my @list = qw( bob dave fred ); searching for dave will return 1 as $list[1] eq dave. Searching for charles will also return 1 as dave is the first entry that is greater than charles.
If there are none of the entries match then -1 is returned. You can either check for this or use it as an index to get the last values in the list. Whichever approach you choose will depend on what you are trying to do.
The actual searching is done using a binary search which is very fast.
SYNOPSIS
use List::Search qw( list_search nlist_search custom_list_search );
# Create a list to search
my @list = sort qw( bravo charlie delta );
# Search for a value, returns the index of first match
print list_search( alpha, @list ); # 0
print list_search( charlie, @list ); # 1
print list_search( zebra, @list ); # -1
# Search numerically
my @numbers = sort { $a <=> $b } ( 10, 20, 100, 200, );
print nlist_search( 20, @numbers ); # 2
# Search using some other comparison
my $cmp_code = sub { lc( $_[0] ) cmp lc( $_[1] ) };
my @custom_list = sort { $cmp_code->( $a, $b ) } qw( FOO bar BAZ bundy );
print list_search_generic( $cmp_code, foo, @custom_list );
This module lets you quickly search a sorted list. It will return the index of the first entry that matches, or if there is no exact matches then the first entry that is greater than the search key.
For example in the list my @list = qw( bob dave fred ); searching for dave will return 1 as $list[1] eq dave. Searching for charles will also return 1 as dave is the first entry that is greater than charles.
If there are none of the entries match then -1 is returned. You can either check for this or use it as an index to get the last values in the list. Whichever approach you choose will depend on what you are trying to do.
The actual searching is done using a binary search which is very fast.
List::Search 0.3 Screenshot
List::Search 0.3 Keywords
Search 0.3
sorted lists
Print List
Perl module
For Fast
fast searching
list
search
searching
module
fast
1
List::Search
ListSearch
List::Search 0.3
Libraries
Bookmark List::Search 0.3
List::Search 0.3 Copyright
WareSeeker periodically updates pricing and software information of List::Search 0.3 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of List::Search 0.3 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
searching for love
searching for a former clarity
searchbug
google search
search google
search engines
listin diario
searchalot
people search
searching for solutions
tv listings
perl modules
merging sorted lists
2006 topps heritage short print list
fast searching engine
search for common ground
job search
job searching
Related Software
Wikipedia search is a superkaramba theme for searching on en.wikipedia.org. Free Download
lftpsearch is a set of Perl scripts that are searching for files and directories on FTP servers. Free Download
Dir::Which is a Perl module to search for directory entries in a list of directories. Free Download
XSearch bridges the gap between Beagle and find/grep. Free Download
Search::FreeText is a free text indexing module for medium-to-large text corpuses. Free Download
Zonestats create an RRD database with the values of CPU and memory (RSS) usage per Solaris 10 zone. Free Download
logviewer is an application for easy management of log files. Free Download
PAM ListMySQL Module joins the functionality of both pam_mysql and pam_listfile. Free Download
Latest Software
Popular Software
Favourite Software