|
Ublas : |
From: Fernando Herrero Carrón (fernando.herrero_at_[hidden])
Date: 2006-06-16 07:33:33
Hi list,
I would like to ask for some help on the following problem:
I have a container of vectors and want to use some sort of accumulator
class, so that
for_each(list.begin(), list.end(), accumulator)
will end up with the sum of all vectors.
I have checked that the sum is done right, but if I call a member method
to get the result from the accumulator it just returns a zero vector.
I have tried returning some other member vectors of the class that are
not involved in STL algorithms and it works fine.
I send a sample code attached. I would appreciate any comments on the
issue.
Thanks a lot,
Fernando