rank of nD fft (Re: what about func(a,a,a)
Author Message
rank of nD fft (Re: what about func(a,a,a)

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

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
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?

Tue, 23 May 1995 22:55:30 GMT
rank of nD fft (Re: what about func(a,a,a)

Quote:
>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

>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?

Is the difficulty you ran into related to a problem
with getting a domain error on the dyadic case of
the obverse?

For example :

f1 =. ' *: y.':11
fn =. ' x.&^y.':11
f =.  f1 : fn

g1 =. '%: y.':11
gn =. ' y.&^.x.':11
g  =. g1 : gn

h  =. f :. g

4
2
2 f 4  NB. verb dyad
16
2 g 16 NB. obverse dyad
4
h 2    NB. same as f 2
4
2 h 4  NB. same as 2 f 4
16
2 (h^: _1) 16  NB. sb same as 2 g 16 but crashes.
domain error

A simpler example which also crashes :
j =. 0: : 1:
k =. 1: : 0:
l =. j :. k
l 4
0
2 l 3
1
l^:_1 (4)
1
2 (l^:_1) 4
domain error

f1 =. ' 129!:0 y.':11

f =. f1 : fn

g1 =. ' 129!:1 y.':11

g  =. g1 : gn

h  =. f :. g

Wed, 24 May 1995 14:34:10 GMT
rank of nD fft (Re: what about func(a,a,a)

Quote:
> Any comments?  Has anyone else done something similar?

We're trying to incorporate some interprocess communication facilities
into the J interpreter.

There are two reasons for it:  (1) It looks like an elegant way to avoid
the incorporation of zillions of features into the interpreter (can you
say "window system"?...)

(2) We want to set up a system of cooperating J interpreters in a work-
station cluster.  (With some sort of parallization happening automatically.)

Some x!:y conjuctions will be used to deal with other processes, and
the concept of a "locale" might be more related to a J process in the cluster
rather than to a file.  I hope the Dictionary sticks for the quite abstract
definition of locales for some more time...

Martin Neitzel

Fri, 26 May 1995 23:42:59 GMT

 Page 1 of 1 [ 4 post ]

Relevant Pages