65 |
|
|
66 |
|
maxIteration = paramSet->getMaxIteration(); |
67 |
|
|
68 |
< |
for(currentIter = 0;currentIter < maxIteration; currentIter++){ |
68 |
> |
for(currentIter = 1;currentIter <= maxIteration; currentIter++){ |
69 |
|
|
70 |
|
// perform line search to minimize f(x + lamda * direction) where stepSize > 0 |
71 |
|
lsMinimizer->minimize(direction, 0.0, 1.0); |
133 |
|
|
134 |
|
//test absolute gradient tolerance |
135 |
|
|
136 |
< |
if (sqrt(dotProduct(gradient, gradient)) < paramSet->getGradTol()) |
136 |
> |
if (sqrt(dotProduct(gradient, gradient)) < paramSet->getGTol()) |
137 |
|
return 1; |
138 |
|
else |
139 |
|
return -1; |