ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/math/ChebyshevPolynomials.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/math/ChebyshevPolynomials.cpp (file contents):
Revision 2146 by tim, Tue Mar 29 21:00:54 2005 UTC vs.
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC

# Line 1 | Line 1
1 < /*
1 > /*
2   * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved.
3   *
4   * The University of Notre Dame grants you ("Licensee") a
# Line 42 | Line 42 | ChebyshevPolynomials::ChebyshevPolynomials(int maxPowe
42   #include "math/ChebyshevPolynomials.hpp"
43  
44   namespace oopse {
45 < ChebyshevPolynomials::ChebyshevPolynomials(int maxPower) : maxPower_(maxPower){
45 >  ChebyshevPolynomials::ChebyshevPolynomials(int maxPower) : maxPower_(maxPower){
46  
47      assert(maxPower >= 0);
48      GeneratePolynomials(maxPower_);
49 < }
49 >  }
50  
51 < void ChebyshevPolynomials::GeneratePolynomials(int maxPower) {
51 >  void ChebyshevPolynomials::GeneratePolynomials(int maxPower) {
52  
53      GenerateFirstTwoTerms();
54  
# Line 58 | Line 58 | void ChebyshevPolynomials::GeneratePolynomials(int max
58      //recursive generate the high order term of Chebyshev Polynomials
59      //Cn+1(x) = Cn(x) * 2x - Cn-1(x)
60      for (int i = 2; i <= maxPower; ++i) {
61 <        DoublePolynomial cn;
61 >      DoublePolynomial cn;
62          
63 <        cn = polyList_[i-1] * twoX - polyList_[i-2];
64 <        polyList_.push_back(cn);
63 >      cn = polyList_[i-1] * twoX - polyList_[i-2];
64 >      polyList_.push_back(cn);
65      }
66 < }
66 >  }
67  
68  
69 < void ChebyshevT::GenerateFirstTwoTerms() {
69 >  void ChebyshevT::GenerateFirstTwoTerms() {
70      DoublePolynomial t0;
71      t0.setCoefficient(0, 1.0);
72      polyList_.push_back(t0);
# Line 74 | Line 74 | void ChebyshevT::GenerateFirstTwoTerms() {
74      DoublePolynomial t1;
75      t1.setCoefficient(1, 1.0);
76      polyList_.push_back(t1);    
77 < }
77 >  }
78  
79 < void ChebyshevU::GenerateFirstTwoTerms() {
79 >  void ChebyshevU::GenerateFirstTwoTerms() {
80      DoublePolynomial u0;
81      u0.setCoefficient(0, 1.0);
82      polyList_.push_back(u0);
# Line 84 | Line 84 | void ChebyshevU::GenerateFirstTwoTerms() {
84      DoublePolynomial u1;
85      u1.setCoefficient(1, 2.0);
86      polyList_.push_back(u1);  
87 < }
87 >  }
88  
89   } //end namespace oopse

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines