|
Boost Users : |
Subject: [Boost-users] [BOOST-users] UBLAS X-<X> operationin ublas?
From: Arman Khalatyan (arm2arm_at_[hidden])
Date: 2009-11-23 06:02:59
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.
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