Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-01-02 10:41:20


On Sun, 31 Dec 2000, John E. Potter wrote:
jpotte> On Sun, 31 Dec 2000, Daryle Walker wrote:
jpotte>
jpotte> > Should we make an algorithm header, with algorithms not covered by the
jpotte> > standard C++ headers <algorithm> or <numerics>. I got the idea from both me
jpotte> > (in "more_io.zip") and Jeremy Siek (in "TokenIterator/tokenizer.zip") having
jpotte> > altered versions of the 'mismatch' algorithm as an implementation detail.
jpotte> > Both versions make the same type of change*, so maybe it can start a new
jpotte> > header.
jpotte>
jpotte> An algorithm library would be nice. Not sure that it should contain
jpotte> non-standard versions of the standard algorithms. One common desire
jpotte> is erase_if. It would require someone to take responsibility for it.

I also like the idea of an algorithm extension library.

jpotte> > * The problem with the standard 'mismatch' algorithm is that is assumes that
jpotte> > the second sequence is at least as long as the first sequence. If it is the
jpotte> > other way, you can switch the arguments, of course. However, sometimes you
jpotte> > have no way of knowing which sequence ends first (like the input stream
jpotte> > iterators). Comparing with an end element is still safe, so we made a
jpotte> > version of the algorithm that checks both sequences for their end before
jpotte> > proceeding.
jpotte>
jpotte> Maybe fixing the standard would be better than creating non-standard
jpotte> versions.

Well, fixing the standard is a more lengthy process. I think it would be
appropriate for us to go ahead and provide the "fixed" version in boost
until it makes it in.

jpotte> Back to algorithms. How about next/prev combination like those for
jpotte> permutations? Others? Maintainers?

Maintenance will probably be a group effort on this one...

Cheers,
Jeremy

----------------------------------------------------------------------
 Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
 Ph.D. Candidate email: jsiek_at_[hidden]
 Univ. of Notre Dame work phone: (219) 631-3906
----------------------------------------------------------------------


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