ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/optimization/LineSearchBasedMethod.cpp
(Generate patch)

Comparing branches/development/src/optimization/LineSearchBasedMethod.cpp (file contents):
Revision 1741 by gezelter, Tue Jun 5 18:02:44 2012 UTC vs.
Revision 1750 by gezelter, Thu Jun 7 12:53:46 2012 UTC

# 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;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines