Boost logo

Ublas :

Subject: Re: [ublas] returning a ublas matrix from a function
From: sanann (padalasaisandeep_at_[hidden])
Date: 2014-08-05 04:27:38


Thank you very much for that.

but on the other hand i tried the same with another part of my code but i
still get the same error. could you kindly help me through this too.

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    const size_t arraySize = 3;
    boost::numeric::ublas::matrix<double> M[arraySize] =
    {
        boost::numeric::ublas::scalar_matrix<double>(2, 2),
        boost::numeric::ublas::scalar_matrix<double>(3, 3),
        boost::numeric::ublas::scalar_matrix<double>(4, 4)
    };

     for (int i=0;i<4;i++)
     {
         std::cout << M[i]<< std::endl;
     }
     return M;
}

I end up with the same error.
error: invalid conversion from 'boost::numeric::ublas::matrix<double>*' to
'int' [-fpermissive]
      return M;
             ^

--
View this message in context: http://boost.2283326.n4.nabble.com/returning-a-ublas-matrix-from-a-function-tp4666050p4666054.html
Sent from the Boost - uBLAS mailing list archive at Nabble.com.