octave-maintainers
[Top][All Lists]
Advanced

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

Re: laguerre.m functions in specfun package


From: Carnë Draug
Subject: Re: laguerre.m functions in specfun package
Date: Thu, 7 May 2015 20:10:54 +0100

On 29 April 2015 at 21:16, Colin Macdonald <address@hidden> wrote:
> On 29/04/15 15:29, Juan Pablo Carbajal wrote:
>>
>> So in the particular case of multinom. What would be the code to
>> evaluate a 100x5 matrix representing 100 values on 5 terms of a
>> multinomial: (x1 + x2 + x3 + x4 + x5)^3
>> and get ans an answer all the terms of the expansion evaluate on the
>> 100 input values?
>
>
> I have not looked at this function but I think what Carnë proposes is that
> it would do exactly what is does right now...  i.e., we *copy* the file from
> <specfun>/inst/multinom.m to <symbolic>/inst/@double/multinom.m
>
> Then someone writes a new <symbolic>/inst/@sym/multinom.m

Yes, this is roughly what I mean (see bottom of email for details on @double).
In some cases, there may not be any need to make an equivalent method
for @sym.

> [...]
> Please always think of this when you want to replace a numerical
> version of a function with a symbolic one (please!). You should
> provide performance (time and memory) justifying the change.
> [...]

The aim is to provide packages as Matlab compatible replacements for Mathwork
toolboxes.  Justification then is where are they on Matlab.  On the specific
case of specfun, sometimes is the symbolic package, other cases it's Octave
core.  All the ones that would belong to core have been moved there in the
last few years, only the ones for symbolic are missing.

Being in the symbolic package does not mean the function will actually
perform a symbolic computation.  Example, iptnum2ordinal [1] which has
nothing to do with image analysis is on the image package.

The only problem I have with this is symbolic's dependency on SymPy which
would be inflicted on users that are not actually interested on symbolic
computations.

> But again, I haven't look at this function yet.
>
> (and I'm ignoring @single for now).
>

You don't have to ignore @single.  Don't place those functions under @double
either, just drop them into the package at "inst/", and they will be used
for non sym objects whatever class they are.  Just like what is happening
now.

Carnë

[1] http://octave.sourceforge.net/image/function/iptnum2ordinal.html



reply via email to

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