octave-maintainers
[Top][All Lists]
Advanced

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

Re: bsxfun and sparse matrices


From: Luca Citi
Subject: Re: bsxfun and sparse matrices
Date: Sat, 19 May 2012 14:25:53 -0400

Hello Jordi,
I was using octave3.2.4 and the following gave me an error:

X = speye(6);
W = 1:6;
XW = bsxfun(@times, X, W);
error: concatenation operator not implemented for ....

Now the HEAD version does not raise the error and works fine.
Someone must have fixed it. Thanks.
The only thing is that octave does not appear to use an heuristic to
understand if the result can be efficiently saved as sparse or not. In
fact:
issparse(XW)
0
I would like to try to improve this. In the end for @times, the
sparsity of the result is the AND of the sparsity of the inputs. In a
sense the result cannot be less sparse than the sparsest input. I
would like to improve this but if you have time and think this is
something worth investing time, feel free to do it. I am pretty sure
it would be more efficient because you know where to look in the
source code. Otherwise, maybe you can give some pointer or suggestions
on how to proceed.

Thanks,
Luca


reply via email to

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