It just recently struck us that three built-in gretl functions
concerned with numerical optimization -- BFGSmax, NRmax and simann --
are anomalous in their treatment of their first argument.
In each case the first argument is an initial parameter vector, given
in straight "matrix" form, and on exit this matrix holds the optimized
vector. This is something that a user-defined function cannot do:
modify an argument given in straight, non-pointer form in such a way
that the caller ends up with the modified version.
While it's not _necessarily_ the case that built-in functions obey the
same rules as user-defined ones, we reckon it's very desirable that
they do, to avoid potential confusion. So in CVS we have done two
* Modified these three functions so they accept a matrix-pointer
* Revised the documentation to specify this form of usage.
For backward compatibility we have not disabled the old form of usage:
calls that give the first argument in straight matrix form will still
work. But we recommend that the new form be used in all newly written
hansl code. We don't have any specific milestone in mind, but it's
possible the old form will be disabled at some future point (with
warning, of course).
Show replies by date