
21 Mar
2009
21 Mar
'09
6:08 p.m.
For some application I need to sum the complex modulus of a collection
of elements.
In short, I want to be able to replace the lambda expression
_1 + bind(&std::norm<double>, _2)
by something more natural like
_1 + llnorm(_2)
For that I use std::accumulate and the lambda library, like in the
next working example;
#include