octave-maintainers
[Top][All Lists]
Advanced

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

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


From: dbateman
Subject: Re: dispatching for sparse (was: Re: kron with a single ...)
Date: Sat, 5 Jan 2008 00:05:19 -0800 (PST)



John W. Eaton wrote:
> 
> [I'm moving this discussion to the maintainers list.  --jwe]
> 
> 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
> 
> 

Sure, then what I would suggest doing is to create a kron method of the
Array and Sparse classes and the octave_value classes and use them rather
than testing for the type. Exactly like what you say you want for sort, min,
max etc for 3.1. This is on my todo list so I'll add kron as well

D.

-- 
View this message in context: 
http://www.nabble.com/dispatching-for-sparse-%28was%3A-Re%3A-kron-with-a-single-...%29-tp14625342p14630667.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

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