Boost logo

Boost Users :

From: Olivier Tournaire (olitour_at_[hidden])
Date: 2007-12-10 21:32:04


OK, thanks. I finaly wrote this :

accumulator_set<double, features<tag::density> >
angular_acc(tag::density::num_bins =
Constantes::_pi/16.,tag::density::cache_size = 2.*Constantes::_pi);
int nb_ech = (int)( (itb->norme()) / pas );
TPoint2D <double> direction = itb->p1 - itb->p2;
direction.normaliser();
// On parcourt tous les échantillons
for (unsigned int j=0;j<nb_ech;j++)
{
    TPoint2D <double> pt = itb->p1 + direction * j;
    double angle = atan2( gy(pt) , gx(pt) );
    angular_acc(angle);
}

Now that I am here, how can I extract the histogram ?

Regards

Eric Niebler a écrit :
> Olivier Tournaire wrote:
>
>> Hi all,
>>
>> I am trying to use boost::accumulators lib and I would appreciate some
>> help. I do not know how to use the tag::density.
>> How do I use :
>>
>> accumulator_set<double, tag::density > angular_acc;
>>
>
> Have a look at the docs:
> http://boost-sandbox.sourceforge.net/libs/accumulators/doc/html/index.html
>
> That should be:
>
> accumulator_set<double, features<tag::density> > angular_acc;
>
>
>> and set
>>
>> density::cache_size
>> density::num_bins
>>
>> To have for example 10 subdivisions between -pi and pi ?
>> Then, how do I extract the results of the accumulation ?
>>
>
> The docs tell you all this, too.
>
>

-- 
Le temps des cerises reviendra. Dans l'immédiat, c'est le temps des noyaux. Courage.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net