Login   Register  
PHP Classes
elePHPant
Icontem

Binary search

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author  
Picture of Alex Fourth
Name: Alex Fourth is available for providing paid consulting. Contact Alex Fourth .
Packages: 1 Browse all classes by Alex Fourth Browse all classes by
Country: Ukraine Ukraine - PHP jobs in Ukraine
Age: 30
All time rank: 110018 in Ukraine Ukraine
Week rank: 474 Up10 in Ukraine Ukraine Up
Innovation award
Innovation award
Nominee: 1x

Winner: 1x


  Detailed description   Download .zip .tar.gz  
This class can be used to quickly search for sorted data in large files using the binary search algorithm.

It can search for a given identifier in a file that has lines that contain only the identifier and a value separated by a tab character.

The class uses the binary search algorithm to quickly narrow the search for a given identifier even when the files are very large.

  Classes of Alex Fourth  >  Binary search  >  Download .zip .tar.gz  >  Support forum Support forum (1)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Binary search
Base name: binary_search
Description: Search for data in files using binary search
Version: 1.0
PHP version: 5.0
License: Artistic License
All time users: 2392 users
All time rank: 1428
Week users: 6 users
Week rank: 413 Up
 
  Groups   Rate classes User ratings   Trackback  
  Applications   Related links   Files Files  

  Groups  
Group folder image Algorithms Numerical and statistical algorithms View top rated classes
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Files and Folders Listing, accessing and manipulating files and folders View top rated classes
Group folder image Searching Search engines, crawling and indexing View top rated classes


  Innovation Award  
PHP Programming Innovation award winner
September 2008
Winner

Prize: One book of choice by Apress
Sometimes it is necessary to search a large amount of data for given information.

One way to reduce the time that is necessary to search the data is to store it in a file sorted by the key search values. Then we can used the binary search algorithm to quickly find the data in the file without having to load it all at once in memory.

This class implements the binary search algorithm in pure PHP code.

Manuel Lemos

  User ratings  
Ratings
Utility
Consistency
Documentation
Examples
Tests
Videos
Overall
Rank
All time:
Perfect (100.0%)
Good (93.8%)
-
Perfect (100.0%)
-
-
Sufficient (69.4%)
228
Month:
Not yet rated by the users

  Trackback links  
Link Description
Another PHPClasses victory Another my class has become a winner of PHP Classes Innovation Award - it’s the implementation of Binary Search algorithm...

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.

  Related links  
Link Description
Binary search Binary search algorithm description on Wikipedia
Dobrotvor Entertaining education project
Fun Era Find lots of fun and entertainment
I wanna be developer project Developers become smarter here (Russian)
Koodix Your little database
Rival Alert Your competitors' public data scraper
The endless art my blog (Russian)
Zillion Outdoors ad company

  Files folder image Files  
File Role Description
Plain text file binary_search.class.php Class Does all work
Accessible without login Plain text file test.php Example Example how to use the class
Accessible without login Plain text file data.csv Data Example data to search in

Download all files: binary_search.tar.gz binary_search.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.