|
|
Related Products | ||||||||||||||||||||||||||||||||||||||||||
Boyer 1.5
Publisher's Description:Boyer - Fast string search (indexOf) using the Boyer-Moorealgorithm. Incorporate this class into your own Java programs to rapidly search strings. use: import com.mindprod.Boyer.Boyer; ... Boyer b = new Boyer("dogcatwombat"); int where = b.indexOf("cat"); or int where = Boyer.indexOf("dogcatwombat","cat"); Boyer-Moore is about twice as fast as String.indexOf when the string you are searching in is 2K or over and the pattern you are searching for is 4 characters or longer. String.indexOf is particularly slow when the pattern begins with a common letter such as "e". Boyer-Moore is fastest when the pattern is long and composed only of uncommon letters, e.g. "z" or "^". If you use a char[] instead of String for your text to be searched, it will run an additional 33% faster. Boyer automatically reverts to String.indexOf when that would be faster. Latest Changes:add icon and pad fileUser License Agreement:This program is for non-military use only. For why I put that restriction, see http://mindprod.com/roedy.html#NONMILITARY If you incorporate any of my code in your programs, they too must be marked for non-military use only.
Social bookmarks:
Latest User Reviews:
Write a Review and Rate Boyer |
|||||||||||||||||||||||||||||||||||||||||||