# | Line 89 | Line 89 | namespace QuantLib { | |
---|---|---|
89 | ||
90 | // conjugate gradient search direction | |
91 | direction = getUpdatedDirection(P, gold2, prevGradient); | |
92 | – | |
92 | sddiff = direction - lineSearch_->searchDirection(); | |
93 | lineSearch_->searchDirection() = direction; | |
94 | // Now compute accuracy and check end criteria | |
# | Line 97 | Line 96 | namespace QuantLib { | |
96 | fnew = P.functionValue(); | |
97 | fdiff = 2.0*std::fabs(fnew-fold) / | |
98 | (std::fabs(fnew) + std::fabs(fold) + NumericConstant::epsilon); | |
100 | – | std::cerr << "fdiff = " << fdiff << "ftol = " << ftol << "\n"; |
99 | if (fdiff < ftol || | |
100 | endCriteria.checkMaxIterations(iterationNumber_, ecType)) { | |
101 | endCriteria.checkStationaryFunctionValue(0.0, 0.0, | |
# | Line 107 | Line 105 | namespace QuantLib { | |
105 | } | |
106 | P.setCurrentValue(x_); // update problem current value | |
107 | ++iterationNumber_; // Increase iteration number | |
110 | – | std::cerr << "in = " << iterationNumber_ << "\n"; |
108 | first_time = false; | |
109 | } else { | |
110 | done = true; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |