ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-2.0/src/math/Polynomial.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-2.0/src/math/Polynomial.hpp (file contents):
Revision 1855 by tim, Sat Dec 4 20:09:19 2004 UTC vs.
Revision 1856 by tim, Mon Dec 6 04:49:53 2004 UTC

# Line 62 | Line 62 | class Polynomial {
62          typedef int ExponentType;
63          typedef ElemType CoefficientType;
64          typedef std::map<ExponentType, CoefficientType> PolynomialPairMap;
65 <        typedef PolynomialPairMap::iterator iterator;
66 <        typedef PolynomialPairMap::const_iterator const_iterator;
65 >        typedef typename PolynomialPairMap::iterator iterator;
66 >        typedef typename PolynomialPairMap::const_iterator const_iterator;
67          /**
68           * Calculates the value of this Polynomial evaluated at the given x value.
69           * @return The value of this Polynomial evaluates at the given x value
# Line 71 | Line 71 | class Polynomial {
71           */
72          ElemType evaluate(const ElemType& x) {
73              ElemType result = ElemType();
74 <            double exponent;
75 <            double coefficient;
74 >            ExponentType exponent;
75 >            CoefficientType coefficient;
76              
77              for (iterator i = polyPairMap_.begin(); i != polyPairMap_.end(); ++i) {
78                  exponent = i->first;
# Line 90 | Line 90 | class Polynomial {
90           */
91          ElemType evaluateDerivative(const ElemType& x) {
92              ElemType result = ElemType();
93 <            double exponent;
94 <            double coefficient;
93 >            ExponentType exponent;
94 >            CoefficientType coefficient;
95              
96              for (iterator i = polyPairMap_.begin(); i != polyPairMap_.end(); ++i) {
97                  exponent = i->first;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines