Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!cs.utexas.edu!uwm.edu!news.mr.med.ge.com!sakari!gurr
From: gurr@sakari (David Gurr 4-6989 MR Sys)
Subject: rank of nD fft (Re: what about func(a,a,a)
Message-ID: <1992Dec4.145530.3124@mr.med.ge.com>
Sender: news@mr.med.ge.com
Nntp-Posting-Host: sakari
Organization: GE Medical Systems, Magnetic Resonance
X-Newsreader: Tin 1.1 PL3
References: <1992Dec4.111043.20054@bernina.ethz.ch>
Date: Fri, 4 Dec 92 14:55:30 GMT
Lines: 33

I was thinking about using rank to specify what 
dimension fft to apply to an array.  I have a nD
fft hacked into J as an external function (129!:0
--fft, monadic is 1D dyadic is nD, and 129!:1
--inverse fft, monadic is 1D, dyadic is nD).  

But now I want to clean things up.  How can I
get a function, say fft, such that the obverse
of fft is the inverse fft and the rank n varient
of fft is the nD fft?  Can I do this in J or do
I need to hack the source?

Thanks for any help.  I'm waiting for _An Implementation
of J_ to arrive, and I have a headache from reading
C.

-David Gurr

PS
I have hacked the internal/external representation
conversion functions 3!:1 and 3!:2 to use ints.
(the hacked functions are 3!:41 and 3!:42) And I
hacked the read and write file functions 1!:1 and
1!:2 to use ints as well (1!:41 and 1!:42).  So I 
can import and export to other Unix programs (and 
MR scanners!).

The dyadic form of 3!:42 takes a vector describing
the type, count, rank, and shape of the vector
to import and a vector of the ravel of the vector
to import.

Any comments?  Has anyone else done something similar?
