ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/NLModel1.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/NLModel1.cpp (file contents):
Revision 1000 by tim, Fri Jan 30 21:47:22 2004 UTC vs.
Revision 1015 by tim, Tue Feb 3 22:54:52 2004 UTC

# Line 25 | Line 25 | SymMatrix NLModel1::FiniteHessian(vector<double>& x, v
25  
26      gplus = calcGrad(tempX);
27  
28 <    hessian.Cloume(i) = (gplus - currentGrad) / hi;  
28 >    //hessian.Colume(i) = (gplus - currentGrad) / hi;  
29  
30      //restore tempX to its original value
31      tempX[i] -= hi;
# Line 66 | Line 66 | double ConcreteNLMode1::calcF(){
66   double ConcreteNLMode1::calcF(){
67    
68    currentF = (*objfunc)(currentX, currentGrad);
69 <  numOfProc++;
69 >  numOfFunEval ++;
70  
71 <  return curretF;
71 >  return currentF;
72   }
73  
74 < double ConcreteNLMode1::calcF(const vector<double>& x){
74 > double ConcreteNLMode1::calcF(vector<double>& x){
75  
76    vector<double> tempGrad(x.size());
77    
# Line 84 | Line 84 | vector<double> ConcreteNLMode1::calcGrad(){
84   }
85  
86   vector<double> ConcreteNLMode1::calcGrad(){
87 <
87 >  
88    currentF = (*objfunc)(currentX, currentGrad);
89  
90    return currentGrad;
# Line 92 | Line 92 | vector<double> ConcreteNLMode1::calcGrad(vector<double
92   }
93  
94   vector<double> ConcreteNLMode1::calcGrad(vector<double>& x){
95 +  vector<double> tempGrad(x.size());
96  
96  vector<double> tempGrad(x.szie());
97
97    double tempF;
98    
99    tempF = (*objfunc)(x, tempGrad);
# Line 102 | Line 101 | vector<double> ConcreteNLMode1::calcGrad(vector<double
101    return tempGrad;
102   }
103  
104 + /*
105   SymMatrix ConcreteNLMode1::calcHessian(){
106    calcGrad(currentX);
107    return FiniteHessian(currentX);
# Line 110 | Line 110 | SymMatrix ConcreteNLMode1::calcHessian(vector<double>&
110   SymMatrix ConcreteNLMode1::calcHessian(vector<double>& x){
111    return FiniteHessian(x);
112   }
113 + */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines