octave-maintainers
[Top][All Lists]
Advanced

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

Re: Cell support for deblank


From: David Bateman
Subject: Re: Cell support for deblank
Date: Wed, 08 Jun 2005 18:41:46 +0200
User-agent: Mozilla Thunderbird 0.8 (X11/20040923)

Keith Goodman wrote:

On 6/8/05, David Bateman <address@hidden> wrote:
Keith Goodman wrote:

Understood. But a "which -all" is still very useful if anyone feels
like making one.



Its not  that difficult to implement a simple version of "which -all".
One of the advantages of octave over its close source competitors is
that with the source being open, the users can propose a patch for the
feature they want, and in all likelihood see this patch included in a
very short delay. That's how open source programs become more feature
rich...

As for "which -all" there is one complication. The octave dispatch
function allows function overloading in a manner similar but different
to matlab classes. Strictly speaking "which -all <fun>" should also
return all of the overloaded functions of <fun> as well with an
indication of the type they are used for. Consider

octave:1> dispatch("inv")
Overloaded function inv
inv(galois,...)->ginv(galois,...)
inv(sparse bool matrix,...)->spinv(sparse bool matrix,...)
inv(sparse complex matrix,...)->spinv(sparse complex matrix,...)
inv(sparse matrix,...)->spinv(sparse matrix,...)

Therefore "which -all inv" for me should return

/opt/octave-2.9/libexec/octave/2.9.3/site/oct/i686-pc-linux-gnu/octave-forge/ginv.oct
# galois
/opt/octave-2.9/libexec/octave/2.9.3/oct/i686-pc-linux-gnu/spinv.oct  #
sparse bool matrix
/opt/octave-2.9/libexec/octave/2.9.3/oct/i686-pc-linux-gnu/spinv.oct  #
sparse complex matrix
/opt/octave-2.9/libexec/octave/2.9.3/oct/i686-pc-linux-gnu/spinv.oct  #
sparse matrix
inv is a built-in function

Its not clear to me the best way to treat that case....

I don't understand the subtleties, but unfortunately that doesn't stop
me from clogging up the mailing list with my comments:

To my way of thinking there are only three functions: ginv, spinv, and
inv. So I'd only output three lines:

/opt/octave-2.9/libexec/octave/2.9.3/site/oct/i686-pc-linux-gnu/octave-forge/ginv.oct
# galois
/opt/octave-2.9/libexec/octave/2.9.3/oct/i686-pc-linux-gnu/spinv.oct  # sparse
inv is a built-in function # Shadowed

Here's the patented, copyrighted, and trademarked output of Matlab:

which -all inv
/usr/local/matlab/toolbox/matlab/matfun/@single/inv.bi  % single method
/usr/local/matlab/toolbox/matlab/matfun/@double/inv.bi  % double method
/usr/local/matlab/toolbox/matlab/matfun/inv.m           % Shadowed

(on my screen the %'s are lined up)


Its a matter of interpretation. Matlab classes overload for a particular class of object. For example all sparse types are of class sparse and there overloaded functions are found in @sparse. In octave the dispatching is done on the type and not the class, and therefore each type is overloaded separately, thus the proposed output of octave and its differences to matlab.. If octave ever gets classes, then this behavior might change.

D.

--
David Bateman                                address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary



reply via email to

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