List Info

Thread: uBlas and STL algorithms




uBlas and STL algorithms
user name
2006-06-16 14:01:53
You hit it!!!

I think I am already too used to passing refs and
shared_ptr's around,
and forgot passing by value. Anyway, I also think my design
is too
complicated by now, so I should rethink it under the light
of the last
two responses.

This solved my problem, thank you very much.

Best regards,
Fernando

El vie, 16-06-2006 a las 15:43 +0200, Markus Schöpflin
escribió:
> Note that I didn't try if this really works but since
for_each makes a copy 
> of the supplied functor, I strongly suspect that this
will help you.
> 
> Fernando Herrero Carrón wrote:
> 
> ...
> 
> >   Accumulator ac;
> >   std::for_each(l.begin(), l.end(), ac);
> ac = std::for_each(l.begin(), l.end(), ac);
> >   std::cout << ac.get_sum() <<
std::endl;
> 
> ...
> 
> HTH, Markus


_______________________________________________
ublas mailing list
ublaslists.boost.org
htt
p://lists.boost.org/mailman/listinfo.cgi/ublas
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )