/** * Description not yet available. * \param */ dvar_vector operator*(const dvar_matrix& m, const dvector& x) { RETURN_ARRAYS_INCREMENT(); if (x.indexmin() != m.colmin() || x.indexmax() != m.colmax()) { cerr << " Incompatible array bounds in " "dvar_vector operator * (const dvar_matrix& m, const dvar_vector& x)\n"; ad_exit(21); } kkludge_object kkk; dvar_vector tmp(m.rowmin(),m.rowmax(),kkk); double sum; for (int i=m.rowmin(); i<=m.rowmax(); i++) { sum=0.0; const dvar_vector& tt=m.elem(i); for (int j=x.indexmin(); j<=x.indexmax(); j++) { //sum+=m[i][j]*x[j]; sum+=tt.elem_value(j)*x.elem(j); } tmp.elem_value(i)=sum; } save_identifier_string("PL4"); x.save_dvector_value(); x.save_dvector_position(); m.save_dvar_matrix_position(); tmp.save_dvar_vector_position(); save_identifier_string("PLX"); gradient_structure::GRAD_STACK1-> set_gradient_stack(dmcv_prod); RETURN_ARRAYS_DECREMENT(); return(tmp); }