slow access to consecutive matrix elements
John W. Eaton
jwe at bevo.che.wisc.edu
Tue Nov 11 09:16:29 CST 2008
On 11-Nov-2008, Francesco Potortì wrote:
| The fact is, I was discounting the fact that a range remains a range
| even after linear transformation, while this does not appear to be the
| case:
|
| octave3.1> typeinfo(1:4)
| ans = range
| octave3.1> typeinfo(4+(1:4))
| ans = matrix
| octave3.1> typeinfo(4*(1:4))
| ans = matrix
|
| >From the depth of my ignorance about Octave's internals, I dare say that
| it should not be too difficult to keep ranges as ranges even after sum
| or product with a scalar. Maybe even after sum with a range with the
| same number of elements. Am I wrong?
Well, someone has to do the work. Making this change requires
* New methods in the Range class to handle addition, subtraction,
multiplication, and division of Ranges by scalars.
* New mixed-type operators operators for the scripting languages.
Given all the other things to do that actually affect the number of
features available (like working on all the compatibility complaints
over the years) I guess this level of detail never seemed that
important to me. I imagine we'd all be happy to consider a patch if
someone were willing to contribute it.
jwe
More information about the Bug-octave
mailing list