|
Ublas : |
Subject: Re: [ublas] Returning vectors or matrices from user functions
From: sanann (padalasaisandeep_at_[hidden])
Date: 2014-08-05 04:08:41
hello,
I am trying to return a array of matrices from a function but when i use
return there is always an error can you please help me.
typedef boost::numeric::ublas::matrix<double> BMT;
BMT fun();
{
BMT mym;
mym.resize(3,3);
for(int i = 0; i<9;++i) mym(i/3,i%3)=i;
std::cout << mym << std::endl;
return mym;
}
error: cannot convert 'BMT {aka boost::numeric::ublas::matrix<double>}' to
'int' in return
return mym;
^
why do i get this error how do i overcome it.
-- View this message in context: http://boost.2283326.n4.nabble.com/Returning-vectors-or-matrices-from-user-functions-tp2711668p4666052.html Sent from the Boost - uBLAS mailing list archive at Nabble.com.