PHP Classes

Binary search: Search for data in files using binary search

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in

  Author Author  
Picture of Alex Fourth
Name: Alex Fourth is available for providing paid consulting. Contact Alex Fourth .
Classes: 1 package by
Country: Ukraine Ukraine
Age: 32
All time rank: 109118 in Ukraine Ukraine
Week rank: 891 Up14 in Ukraine Ukraine Up
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

  Detailed description   Download 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 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: 2673 users
All time rank: 1338
Week users: 1 user
Week rank: 1124 Up
  Groups   Rate classes User ratings   Trackback  
  Applications   Related pages   Files Files  

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

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  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Perfect (100%) Good (93%) - Perfect (100%) - - Sufficient (69%) 250
Month: Not yet rated by the users

  Pages that reference this package  
Another PHPClasses victory
Another my class has become a winner of PHP Classes Innovation Award - itís the implementation of Binary Search algorithm...

Latest pages that reference packages Latest pages that reference packages

  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Related pages  
Binary search
Binary search algorithm description on Wikipedia
Entertaining education project
Fun Era
Find lots of fun and entertainment
I wanna be developer project
Developers become smarter here (Russian)
Your little database
Rival Alert
Your competitors' public data scraper
The endless art
my blog (Russian)
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 Download all files: binary_search.tar.gz
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.