dpxguard-boost | 4 Jul 16:04

Any interest in generic sequence searching through single-pass iterators?

Hi list,

I have written in my free time the "single_pass_search" C++ template function, which performs generic
sequence searching similarly to the std::search STL algorithm. The most important quality of
single_pass_search and its main advantage over std::search is its capability to search for a
sub-sequence in a search-range that is accessed through a pair of single-pass (input) iterators, while
std::search requires that the search-range must be accessed via forward iterators at least.

For example, single_pass_search can easily search a file directly through a pair of istream iterators,
while std::search requires the interference of an intermediate container in order to obtain the file
data via a pair of forward iterators at least. With data sources like istream, using single_pass_search
instead of std::search is by far simpler, more efficient and less memory consuming as well, because the
std::search algorithm additionally requires an intermediate container and some stream buffering logic.

Anybody interested?

For more information, I have uploaded in the "Boost File Vault" the following files:

Documentation:  Home/Algorithms/single_pass_search/single_pass_search.html
Implementation:  Home/Algorithms/single_pass_search/single_pass_search.h
Example:           Home/Algorithms/single_pass_search/Example..cpp

Best regards,
Jim Xochellis

      
___________________________________________________________ 
Χρησιμοποιείτε Yahoo!; 
Βαρεθήκατε τα ενοχλητικά μηνύματα (spam); Το Yahoo! Mail 
διαθέτει την καλύτερη δυνατή προστασία κατά των
(Continue reading)

Mathias Gaunard | 4 Jul 17:55

Re: Any interest in generic sequence searching through single-pass iterators?

dpxguard-boost <at> yahoo.gr wrote:
> Hi list,
> 
> I have written in my free time the "single_pass_search" C++ template function, which performs generic
sequence searching similarly to the std::search STL algorithm. The most important quality of
single_pass_search and its main advantage over std::search
> is its capability to search for a sub-sequence in a search-range that is accessed through a pair of
single-pass (input) iterators, while std::search requires that the search-range must be accessed via
forward iterators at least.

I guess it could be interesting to overload std::search to work with
input iterators too.
There is no need to give it a different name.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

dpxguard-boost | 4 Jul 18:29

Re: Any interest in generic sequence searching through single-pass iterators?

Jim Xochellis wrote:

> > I have written in my free time
the "single_pass_search" C++ template function, which performs generic
sequence searching similarly to the std::search STL algorithm. The most
important quality of single_pass_search and its main advantage over
std::search
> > is its capability to search for a sub-sequence
in a search-range that is accessed through a pair of single-pass
(input) iterators, while std::search requires that the search-range
must be accessed via forward iterators at least.

Mathias Gaunard wrote:

> I guess it could be interesting to overload std::search to work with
> input iterators too.
> There is no need to give it a different name.

Unfortunately,
I cannot think of a way to "overload" std::search  to work with input
iterators, without changing its behavior significantly. Please see the
section "Oddities and drawbacks" of the
Home/Algorithms/single_pass_search/single_pass_search.html documentation file in the
"Boost File Vault", for more details.

Best regards,
Jim Xochellis

      
___________________________________________________________ 
(Continue reading)


Gmane