[ Home Page ] [ Eiffel Archive ] [ Eiffel Classes and Clusters]

Arc de Triomphe clipart (2486 bytes)

BFS: A Binary File Searcher

Written by Steven White.

Version 1.01

binary_file_search_1_01.zip (8,000 bytes) - source code
sjwhite@apexmail.com Steven White (maintainer) mail address.


This file allows a sorted file to be searched using the binary file search algorithm. Duplicate entries are allowed and the entry seperator can be easily changed. The class also includes a routine to add new data to the file. I wrote this to search a 17,000 word dictionary for a natural language parser project.


This class uses ISE's PLAIN_TEXT_FILE class. Because of this I wrote a plain_text_file compatibility class for Visual Eiffel and SmallEiffel so I could use this binary search class with these other compilers. The plain_text_file compatibility class is available from Eiffel Forum Archive here. If the Eiffel compiler you are using is not from ISE you will need this class!

Simply copy the binary_file_search.e class to a convenient location and use!


This class is easy to use but note the file to be searched must have the first delimted field sorted! For example.


Included is a utility I wrote (in C :-)) called DSort. DSort will sort a delimited file. Type DSort at the prompt with no arguments for it's parameters.

The default seperator is a comma but any other character can be used.

Known Problems

None. Just don't try to add 1000s of entries using insert_line. :-)

Let me know of any problems at the email address below!

Steven White: sjwhite@apexmail.com
01 April 1999 (Added to Eiffel Forum Archive: 30 December 1999)

[ Home Page ] [ Eiffel Archive ] [ Eiffel Classes and Clusters]