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



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

   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

   f 2    NB. verb monad
4
   g 4    NB. obverse monad
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

   What about something like:

   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  
 
 [ 4 post ] 

 Relevant Pages 

1. rank of fork versus rank of sentence

2. Passing variables from Func to Func

3. QUESTION: Passing variables from Func to Func???

4. Smalltalk positions in Fargo, ND

5. ND Catalyst Snipet

6. XPL compiler ported to 486 nd above

7. Comments on 2'nd REXX program requested

8. VHDL FPGA nd DSP Tutorials

9. TCL POLL: 2'nd day

 

 
Powered by phpBB® Forum Software