
Thank you Eric. I finally found the answer thanks to the doc. However in the doc, you use typedef iterator_range<std::vector<std::pair<double, double> >::iterator histogram_type; And it does not compile because iterator_range is in the boost namespace that I did not defined earlier. I had to declare the histogram_type this way : typedef boost::iterator_range<std::vector<std::pair<double, double>
::iterator histogram_type; And, finally, extract the result
histogram_type histogram = density(angular_acc); Now, it works and compile fine. Thank you for this very usefull lib ! Regards, Olivier Eric Niebler a écrit :
Olivier Tournaire wrote:
Thank you Eric, it now compiles fine. However, I am still having problem to acces the histogram :
typedef iterator_range<std::vector<std::pair<double, double> >::iterator
histogram_type; histogram_type histogram = tag::density(angular_acc); // error C2143: erreur de syntaxe : absence de ';' avant '<' (--> "syntax error : missing ';' before '<'")
Your problem is here, but I bet you can find it yourself if you read the docs on extracting results: http://tinyurl.com/2q2ttl (http://boost-sandbox.sourceforge.net/libs/accumulators/doc/html/accumulators...)
Hint: feature tags are in the "tags" namespace, but extractors are not.
And for the return type of the density extractor, you should look at the docs for density: http://tinyurl.com/3ycetz (http://boost-sandbox.sourceforge.net/libs/accumulators/doc/html/accumulators...)
-- Le temps des cerises reviendra. Dans l'immédiat, c'est le temps des noyaux. Courage.