--- trunk/OOPSE-4/src/math/Polynomial.hpp 2005/11/16 23:10:02 2448 +++ trunk/OOPSE-4/src/math/Polynomial.hpp 2006/01/30 22:25:27 2576 @@ -243,8 +243,32 @@ namespace oopse { } return p; + } + + template + Polynomial operator *(const Polynomial& p, const ElemType v) { + typename Polynomial::const_iterator i; + Polynomial result; + + for (i = p.begin(); i !=p.end(); ++i) { + result.addCoefficient( i->first , i->second * v); + } + + return result; } + template + Polynomial operator *( const ElemType v, const Polynomial& p) { + typename Polynomial::const_iterator i; + Polynomial result; + + for (i = p.begin(); i !=p.end(); ++i) { + result.addCoefficient( i->first , i->second * v); + } + + return result; + } + /** * Generates and returns the sum of two given Polynomials. * @param p1 the first polynomial