octave-maintainers
[Top][All Lists]
Advanced

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

Re: octave "Most Wanted" feature


From: robert bristow-johnson
Subject: Re: octave "Most Wanted" feature
Date: Wed, 29 Nov 2006 09:55:46 -0500

> From: "Tom Holroyd" <address@hidden>
> Subject: Re: octave "Most Wanted" feature
> Date: Wed, 29 Nov 2006 06:51:25 -0500 (EST)
>
>
> > the point is so that the indices can be directly meaningful to the > 
> interpretation of the data that they are associated with.
>
> Use a higher level function for that.

in other words, we should work for the computer, instead of the computer 
working for us.

> That's not a good enough reason to mess around with low level internal 
> representations.

that subjective judgement is not one that i share.



> From: "Tom Holroyd" <address@hidden>
> Subject: Re: octave "Most Wanted" feature
> Date: Wed, 29 Nov 2006 07:27:50 -0500 (EST)
>
>
> OK, I'm willing to concede the point that this might not add much more than a 
> single add instruction,

there are a few/couple of instructions, depending on the operation.  when 
arrays are added, besides checking to see if the number of rows and columns are 
correctly matched, Octave also checks the Index Origin for each dimension.  
(except, in both cases, if one of the arrays is a 1x1 scaler.)

> if you always did it and it was always restricted to integers. FFTW arrays 
> already have origin and stride, don't they? And I guess I should face the 
> fact that Octave arrays are already a higher-level representation, eh? :-)
>
> So, octave_index_origin() and octave_array_stride() don't really cut it, 
> since each dimension needs its own stride. So you'd need a special type that 
> included origin and stride in the constructor, right?

i dunno why you're adding stride to this.  Arrays already have an implicit 
stride which is the length of coulmns for Octave and the length of rows for 
MATLAB (since Octave and MATLAB sorta switch the roles of columns and rows).  
and there exists a function, reshape(.), for manipulating these "strides".

--

r b-j                  address@hidden

"Imagination is more important than knowledge."




reply via email to

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