term by term product of vectors (or proxies thereof)
hi,
what's the best way to achieve x*=y? where x and y are vectors (or
proxies) of identical size? although i wrote a function (below) i hope
there's already some ublas related facility to do so.
template<typename D> class Op_product_term_by_term{
public:
Op_product_term_by_term(D& dest):iter(dest.begin()),end(dest.end()){};
void operator()(double elem);
private:
typename D::iterator iter;
typename D::iterator end;
};
template<typename D> void Op_product_term_by_term<D>::operator()(double
elem){
if(iter
participants (1)
-
e r