octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Numerical or other significant code in DEFUN functions


From: John W. Eaton
Subject: Numerical or other significant code in DEFUN functions
Date: Fri, 03 May 2013 01:41:22 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11

The recent addition of the ellipj function to the Octave sources
reminded me of a long-standing issue that I would like to correct.  In
the new ellipj function, the numerical code is inside the new DEFUN
function, so it is not easily accessible from other C++ code.

As much as possible, DEFUN functions should be simple wrappers aroudn
library code.  Ideally, they should decode arguments and then call
library functions and not do much else.  We have a number of other
functions where this is a problem, so I'm not picking on ellipj in
particular.  But I would prefer to not have more functions like this,
or encourage more functions like this to be added in the future.

In the case of ellipj, I would move the sncndn functions into
liboctave (preferably with more meaningful names), and I would also
provide versions of those functions that accept array arguments so
that they might be used from C++ without having to write the loops.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]