Fix wrong hessian order in amplgsl.cc and gsl-test.cc #77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the hessian order in
amplgsl.cc
andgsl-test.cc
do not accord with the instruction infuncadd.h
:In this case, the function should set al->hes[i + j*(j+1)/2] to the partial derivative of the function with respect to al->ra[i] and al->ra[j] for all 0 <= i <= j < al->nr.
and do not accord with the instruction in Page 19 of https://ampl.com/wp-content/uploads/Hooking-Your-Solver-to-AMPL-by-David-M.-Gay.pdf.I already pull up a merge request in #75 but forgot to modify the hessian order in
gsl-test.cc
and the code was reverted by @fdabrandao . This new code also fixes the bug ingsl-test.cc
. Could you review this code and merge it? Thanks again!