Boost logo

Boost :

Subject: Re: [boost] [SPAM (Bayesian)] - Re: Formal Review: Boost.RangeEx - Bayesian Filter detected spam
From: Rogier van Dalen (rogiervd_at_[hidden])
Date: 2009-03-02 11:07:20


On Mon, Mar 2, 2009 at 15:36, David Abrahams <dave_at_[hidden]> wrote:
>
> on Mon Mar 02 2009, Robert Jones <robertgbjones-AT-gmail.com> wrote:
>
>> AFAICS there's no issue in principle with something like
>>
>> vecn | boost::adaptors::sort
>>
>> as an expression. This would result in a range that could be iterated
>> through lazily,
>
> What does it mean to "iterate lazily?"
>
>> although in total could not be as efficient as a traditional
>> sort.
>
> What did you have in mind, using partial_sort?

I can't speak for Robert, of course, but wouldn't a heap provide O(n)
access to the first element and O(n log n) access to all elements, but
in all but a few cases be a constant factor slower than introsort?

Cheers,
Rogier


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