@@ -39,6 +39,13 @@ public class Array implements AutoCloseable {
3939 private native static FloatComplex [] getFloatComplexFromArray (long ref );
4040 private native static DoubleComplex [] getDoubleComplexFromArray (long ref );
4141
42+ private native static long fft (long a );
43+ private native static long fft2 (long a );
44+ private native static long fft3 (long a );
45+
46+ private native static long ifft (long a );
47+ private native static long ifft2 (long a );
48+ private native static long ifft3 (long a );
4249
4350 // Binary operations
4451 private native static long add (long a , long b );
@@ -476,6 +483,42 @@ public static Array sqrt(Array a) throws Exception {
476483 public static double maxAll (Array a ) throws Exception { return maxAll (a .ref ); }
477484 public static double minAll (Array a ) throws Exception { return minAll (a .ref ); }
478485
486+ public static Array fft (Array a ) throws Exception {
487+ Array ret_val = new Array ();
488+ ret_val .ref = fft (a .ref );
489+ return ret_val ;
490+ }
491+
492+ public static Array fft2 (Array a ) throws Exception {
493+ Array ret_val = new Array ();
494+ ret_val .ref = fft2 (a .ref );
495+ return ret_val ;
496+ }
497+
498+ public static Array fft3 (Array a ) throws Exception {
499+ Array ret_val = new Array ();
500+ ret_val .ref = fft3 (a .ref );
501+ return ret_val ;
502+ }
503+
504+ public static Array ifft (Array a ) throws Exception {
505+ Array ret_val = new Array ();
506+ ret_val .ref = ifft (a .ref );
507+ return ret_val ;
508+ }
509+
510+ public static Array ifft2 (Array a ) throws Exception {
511+ Array ret_val = new Array ();
512+ ret_val .ref = ifft2 (a .ref );
513+ return ret_val ;
514+ }
515+
516+ public static Array ifft3 (Array a ) throws Exception {
517+ Array ret_val = new Array ();
518+ ret_val .ref = ifft3 (a .ref );
519+ return ret_val ;
520+ }
521+
479522 public static Array sum (Array a , int dim ) throws Exception {
480523 Array ret_val = new Array ();
481524 ret_val .ref = sum (a .ref , dim );
0 commit comments