Boost logo

Boost Users :

Subject: [Boost-users] error compiling an accumulator sample
From: Conoscenza Silente (abruzzoforteegentile_at_[hidden])
Date: 2010-06-03 05:10:53


Hi All
I cannot build the following sample using accumulators.
Do you know why?
I used times ago an example and it worked without any problem.
Can you help me with that?

I have the following error
error: ‘covariate1’ was not declared in this scope

#include <iostream>
#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/stats.hpp>
#include <boost/accumulators/statistics/mean.hpp>
#include <boost/accumulators/statistics/moment.hpp>
#include <boost/accumulators/statistics/variance.hpp>
#include <boost/accumulators/statistics/covariance.hpp>

using namespace boost::accumulators;

int main()
{
    accumulator_set<double, stats<tag::mean, tag::variance,
tag::covariance<double, tag::covariate1> > > x_acc;
    x_acc( 1.1, covariate1 = 2.2 ) ;
    return 0;
}



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