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 |
|
|
78 |
|
double tempF; |
79 |
|
|
80 |
< |
//tempF = (*objfunc)(x, tempGrad); |
80 |
> |
tempF = (*objfunc)(x, tempGrad); |
81 |
|
numOfFunEval ++; |
82 |
|
|
83 |
|
return tempF; |
91 |
|
|
92 |
|
} |
93 |
|
|
94 |
< |
vector<double> ConcreteNLMode1::calcGrad(const vector<double>& x){ |
95 |
< |
vector<double> tempGrad; |
96 |
< |
//vector<double> tempGrad(x.szie()); |
94 |
> |
vector<double> ConcreteNLMode1::calcGrad(vector<double>& x){ |
95 |
> |
vector<double> tempGrad(x.size()); |
96 |
|
|
97 |
|
double tempF; |
98 |
|
|
99 |
< |
//tempF = (*objfunc)(x, tempGrad); |
99 |
> |
tempF = (*objfunc)(x, tempGrad); |
100 |
|
|
101 |
|
return tempGrad; |
102 |
|
} |