23 Nov
2009
23 Nov
'09
11:02 a.m.
Hello, how can I rewrite following expression to UBLAS? template <class T> boost::numeric::ublas::matrix<T> SubstractMeans( boost::numeric::ublas::matrix<T> &m, boost::numeric::ublas::vector<T> &vMeans) { ublas::matrix<T> mout(m.size1(), m.size2()); for(size_t i=0;i<m.size1();i++) for(size_t j=0;j<m.size2();j++) { mout(i,j)=m(i, j)-vMeans(i); } //cout<<mout<<endl; return mout; } thanks, Arman.