Boost logo

Ublas :

From: Simon Perreault (nomis80_at_[hidden])
Date: 2006-06-16 09:03:52

Fernando Herrero Carrón wrote:
> I have a container of vectors and want to use some sort of accumulator

Have you tried using the accumulate() function? See Maybe this would work:

vector<double> sum(3);
sum(0) = 0; sum(1) = 0; sum(2) = 0;
sum = accumulate( l.begin(), l.end(), sum );