Boost logo

Ublas :

From: Bumbrlik (bumbrlik007_at_[hidden])
Date: 2007-08-04 22:43:35


I use boost 1.34.0 and VC++ 2005. I get several warning that I can not
decipher when compiling the following function (it removes means from
columns). Why and how do I fix it ?

Thank you.

void DemeanData(ublas::matrix<double>& A)
    {
    // loop through all columns
    for(unsigned int i=0; i<A.size2(); ++i)
        {
        ublas::matrix_column<ublas::matrix<double> > Acolumn(A, i);
        double columnMean = sum(Acolumn)/A.size1();
        // this line generates the warnings
        Acolumn -= ublas::scalar_vector<double> (A.size1(), columnMean);
        }
    }