Boost logo

Boost :

Subject: Re: [boost] Proposed Library Boost.Algorithm
From: TONGARI (tongari95_at_[hidden])
Date: 2011-03-31 13:08:18


Hi Marshall,

2011/3/31 Marshall Clow <mclow.lists_at_[hidden]>

> (Finally) I have uploaded to the vault <
> http://www.boostpro.com/vault/index.php?action=downloadfile&filename=Boost.Algorithm-008.zip&directory=Algorithms&>
> a proposal for the Boost.Algorithm library.
>

Thanks for working on this!

I've taken a glimpse at your code, and I'd like to suggest to specify the
requirement of the iterator explicitly, for example, RandomAccessIterator
rather than 'patIter', and be sure to document these requirements clearly (I
only saw them in comments).

[...]

1) Three search algorithms: Boyer-Moore, Boyer-Moore-Horspool and
> Knuth-Morris-Pratt. (search.hpp)
>

Recently I just implemented the KMP algorithm, and in my implementation, it
requires the corpus iterator to be InputIterator for search to return a
bool, and ForwardIterator to return the iterator, maybe you also want to
lower down the requirement for RandomAccessIterator here?

To be more flexible in searching, it could also give a way to search all or
some of the results up to a threshold, not just the first one.
The interface may like what Regex provides (I'm not certainly sure), or it
should let users provide a visitor for the resultant corpus iterators.

What do you think?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk