From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2007-02-18 19:44:42
"Matthias Troyer" <troyer_at_[hidden]> wrote in message
> On 16 Feb 2007, at 19:47, Gennadiy Rozental wrote:
>> "Matthias Troyer" <troyer_at_[hidden]> wrote in message
>>> On 16 Feb 2007, at 19:24, Gennadiy Rozental wrote:
>>>> Anyway. IMO almost any solution would be good enough for me.
>>>> would work either.
>>> Why is
>>> a problem if
>>> is fine?
>> I never said it's a problem. But from what understand it's completely
>> different thing. acc(0) would be more close to v += 0; acc(v) is
>> more like
>> v *= 2;
> Now I'm really confused. acc is the accumulator, recording features
> like sum,min, max, mean, median, variance. In what sense is acc(0)
> like v +=0 and acc(v) like v *= 2????
Umm. I maybe wrong.
Here is correct correspondence (<==> means equivalent):
acc(s1) ; <==> v = s1;
acc(s2) ; <==> v = s1;
acc(s3) ; <==> v = s3;
v+=s1 doesn't really have anything corresponding in current interface. Maybe
something like this:
T value = 0;
value += s1;
v += s1; <==> acc(value);
value += s2;
v += s2; <==> acc(value);
value += s3;
v += s3; <==> acc(value);
value -= s4;
v -= s4; <==> acc(value);
value += 0;
v += 0; <==> acc(value);
If you think this as collecting samples of some variable values v+=0 look
pretty natural. if you think about it as accumulating set of values
acc(value) looks better.
Doesn't matter to me either way. It still does the same thing.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk