Re: array processing in Lisp



"metaperl.com" <metaperl@xxxxxxxxx> writes:

On Dec 9, 11:22 am, Alan Crowe <a...@xxxxxxxxxxxxxxxxxxxxxxx> wrote:


I think that the displacement stuff tries to let you have
the same flexibility that you have in assembler, in
combination with the high-level goodies.

Ok, I get it, you have the ability to perceive and manipulate the same
data elements but with different rank paradigms. The 12 items below
were made into a rank-1 array. And then "displaced" as a rank-2 array.
And could've been displaced as a rank-3 array.

However, I have never encountered a case where this degree of
flexibility was useful. Can you provide a case where this is valuable?

The only example I know is in computing Discrete Fourier
Transforms. You can compute a 35 point transform as seven 5
point transforms, a bit of twiddling, five 7 point
transforms and an unshuffle.

CL-USER> (dotimes (i 12 *v*)

I managed to get this to work without listing *v* in dotimes:
(dotimes (i 12) (setf (aref v i) (gensym)))

Did you spot that when you left out the *v* the dotimes form
returned NIL?

Alan Crowe
Edinburgh
Scotland

.



Relevant Pages

  • Re: array processing in Lisp
    ... I think that the displacement stuff tries to let you have ... And could've been displaced as a rank-3 array. ... flexibility was useful. ... The header would probably ...
    (comp.lang.lisp)
  • Re: Biot-Savarts Law
    ... tensor transforms as ... distribution to the inertial frame ... current in the moving frame, ... obviously the displacement current... ...
    (sci.physics.electromag)