Lazy KMP range

Dmitry Olshansky dmitry.olsh at gmail.com
Fri Jun 15 13:18:56 PDT 2012


On 15.06.2012 23:41, Roman D. Boiko wrote:
> On Friday, 15 June 2012 at 19:03:56 UTC, bearophile wrote:
>> A lazy Knuth-Morris-Pratt that works on a Input Range:
>> http://ideone.com/dUs5B
>>
>> Do you have suggestions for improvements of the code? Maybe do I have
>> to turn it into a Forward Range if the first range is a Forward one?
>> Is something similar to this useful for Phobos?
>>
>> Bye and thank you,
>> bearophile
>
> Pay attention to "Licensed under the PSF License" for your source
> implementation. You will not be able to include it into Phobos unless
> implementation details that you borrowed from Python implementation can
> be found elsewhere under terms that allow applying Boost license.

Bearophile if license is a problem you might try your hand on these:

http://www-igm.univ-mlv.fr/~lecroq/string/

A lot of stuff ;)
-- 
Dmitry Olshansky


More information about the Digitalmars-d-learn mailing list