[PATCH 0 of 4] Implement basic sparse op diag and diag op sparse support.

Jaroslav Hajek highegg at gmail.com
Thu Mar 12 06:37:18 CDT 2009


On Mon, Mar 9, 2009 at 10:52 PM, Jason Riedy <jason at acm.org> wrote:
> Only *, /, \, +, and - are implemented.  Those are the ones that would be nicest to have, at
> least for me.  Because the support is limited to those operations, I avoided serious macro
> hackery and most of the auto-generation mechanism.  It's overkill here.
>
> I'll poke at permutation matrices next.  I have code that works, but I need to clean it up
> considerably.
>
> I'd love to see this considered for 3.2.  Having eye (N) * A stay sparse would be great,
> as would regularization_factor * eye (N) + A.  Code would be much more readable.  The only
> possible downside would be if someone is relying on multiplication by eye () to make a
> sparse matrix dense.
>
> Jason
>

Update:

I have applied all Jason's changes to my test repository, fixed the
diagonal * sparse problems, removed the checks for single-element
diagonal matrices and made a few other adjustments (such as not
introducing namespaces yet).

I built and make check'ed successfully. The result can be checked out
from my repo:
http://hg.tw-math.de/highegg

I basically agree with these changes, because their logic is
undeniable (that was a good film :-).  I would, however, like to see
more people say "yes" before including them for 3.2.x. In any case, I
think they should be included, possibly after 3.2.x is forked. These
changes do not yet modify the default conversion of diagonal matrices
- that would be the most incompatible change, probably, and maybe
should be further discussed.

Jason, thanks for this work.

cheers

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



More information about the Octave-maintainers mailing list