octave-maintainers
[Top][All Lists]
Advanced

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

Re: Build in functions (exprnd)


From: Doug Stewart
Subject: Re: Build in functions (exprnd)
Date: Sun, 4 Nov 2018 10:44:22 -0500



On Sun, Nov 4, 2018 at 10:16 AM Mohammed Elmusrati <address@hidden> wrote:
Hello,

We had a complex simulation program to assist systems’ reliability. Anyhow the code was written in Octave 4.0.2. We have observed that the same code does not work on Octave 4.4.1 and the reason that ( 'exprnd’ undefined)!  This function generates random numbers with exponential distribution. Is it a bug or the function has been removed from the new version of Octave?

Thank you 

Mohammed Elmusrati

---------------------------------------
Mohammed Elmusrati, Full Professor
Head of Industrial Digitalization Team
Faculty of Technology
University of Vaasa
Phone: +358 50 4003763



I think you will find  exprnd  in the statistics package.
I think it was moved there.

 

On 2 Nov 2018, at 20:58, Rik <address@hidden> wrote:

On 11/02/2018 11:36 AM, John W. Eaton wrote:
On 11/02/2018 02:10 PM, Rik wrote:
11/2/18

I checked in a changeset to deprecate the C++ function is_hghandle in favor
of ishghandle (https://hg.savannah.gnu.org/hgweb/octave/rev/fbc23950b00a).
Where possible, it is better to have the C++ function names match the
Octave language functions so that programmers who are unfamiliar with the
core C++ code can, nevertheless, follow what the code is doing.

However, I'm now getting compilation messages that deprecated functions are
unused.  This hasn't been a problem before because the use of the
OCTAVE_DEPRECATED macro has been in .h header files, but the most recent
change takes place in a .cc file.

One possible solution is to have the OCTAVE_DEPRECATED macro also set the
attribute for unused.  Or, programmers could specifically add the
OCTAVE_UNUSED decoration to the function as well.  This works, but to my
eye seems long and klunky.  But, we also shouldn't care too much since this
code will be deleted within two versions of Octave.

OCTAVE_UNUSED OCTAVE_DEPRECATED (5.0, "use 'ishghandle' instead")

Does anyone else have an opinion on which path to take?

There's no need to mark a static function as deprecated since its scope
is only inside the file where it is defined.  So you can simply remove it
if it is no longer needed.

Good point.  I removed the unnecessary functions.

--Rik



--
DASCertificate for 206392


reply via email to

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