Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-08-14 11:32:30

Zach Laine wrote:
> On 8/13/07, Eric Niebler <eric_at_[hidden]> wrote:
>>> The issues Steven has raised wrt the use of commit(). If there really
>>> are no efficiency gains from the commit() technique, it is unidiomatic
>>> enough that I think it should go away.
>> Have you followed recent messages in that thread? I was able to explain
>> the rationale for the inserters in a way that made sense to Steven. This
>> is the key message:
> Yes, but rereading that one indicates that I may have misunderstood
> some things. Is it the case that the ordered_inserter/commit() design
> is an optimization for the general case of sequence insertion? If so,
> I question whether the user should be forced to use this when there is
> an efficient iterator-based technique that works as well.

No, they shouldn't. That message presented the rationale for basing the
low-level interface on inserters. There is not reason why there
shouldn't also be a higher-level interface that is easier to use.

> In fact,
> many people will choose an iterator-based insertion technique even if
> it's less efficient, when the efficiency gains are insignificant,
> simply for the readability and maintenance benefits.

My current thinking is to provide an ordered appender and then add a
push_back(), implemented in terms of the ordered appender, to the time
series types which can efficiently support it. Then std::back_inserter()
would Just Work. I wouldn't add push_back() to any type which couldn't
efficiently support it, though, for the same reasons that std::list
doesn't have operator[].

>>> coarse_grain() and fine_grain() need to be customizable.
>>> I would still like to see a int/floating point mapping from sample
>>> space to index space for dense_series<> that you alluded to in a
>>> previous email.
>> Are you referring to an interpolating facade? Yes, that is a must have.
> That would be great to have too. I was refering to the use of
> arbitrary up-sample and down-sample functors in these functions.

Ah, right. Also on the ToDo list.

Eric Niebler
Boost Consulting
The Astoria Seminar ==>

Boost list run by bdawes at, gregod at, cpdaniel at, john at