Skip to content

Commit

Permalink
atoms restart file for CGDESCENT and LBFGS
Browse files Browse the repository at this point in the history
  • Loading branch information
dsambit committed Oct 17, 2019
1 parent f89f5ae commit 87adfa3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/cg_descent_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ inline double cgd_value(double* x, INT n)

std::vector<double> funcValue;
functionToBeMinimized->value(funcValue);

functionToBeMinimized->save();

++glob_nfev;
return funcValue[0];
Expand Down Expand Up @@ -82,6 +84,8 @@ inline void cgd_gradient(double* g, double* x, INT n)

functionToBeMinimized->update(solutionInc);

functionToBeMinimized->save();

std::vector<double> gradient;
functionToBeMinimized->gradient(gradient);

Expand Down Expand Up @@ -117,6 +121,8 @@ inline double cgd_value_gradient(double* g, double* x, INT n)

functionToBeMinimized->update(solutionInc);

functionToBeMinimized->save();

std::vector<double> funcValue;
functionToBeMinimized->value(funcValue);

Expand Down

0 comments on commit 87adfa3

Please sign in to comment.