octave-maintainers
[Top][All Lists]
Advanced

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

dispatching for sparse (was: Re: kron with a single ...)


From: John W. Eaton
Subject: dispatching for sparse (was: Re: kron with a single ...)
Date: Fri, 04 Jan 2008 16:21:08 -0500

[I'm moving this discussion to the maintainers list.  --jwe]

On  4-Jan-2008, David Bateman wrote:

| What we need to do to fix this is to use the newly introduced object
| classes (ie the "@" directories in this case) and the superiorto
| function to force mixed sparse/full function to be treated by the sparse
| versions of the functions. As we are still missing the superiorto
| function this isn't yet possible and so even converting to object
| classes won't help here yet... I think this is one that will have to
| wait at the moment.

As it is currently implemented, the new class-based dispatching won't
really help here since the class of a sparse object is always double.

One possibility is to extend the class-based dispatch to be finer
grained so that we can dispatch on "sparse", "sparse complex matrix",
"sparse bool matrix", etc. (the string returned by typeinfo).  But
this adds even more complexity to the type dispatch code, and I think
I'd prefer to avoid it.

Another possibility is to merge the sparse code with the existing
functions and dispatch internally.  For example, we would eliminate
spkron and just have kron, which then needs to do the dispatching
itself for the various "internal" types.

Comments?

jwe


reply via email to

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