jfftw is a simple, and partial, Java interface to the highly optimised FFTW C-package from Matteo Frigo and Steven Johnson from the Department of Applied Mathematics, MIT.
This package uses the Java jni interface and must have the both the native FFTW3 library and the local native sharable JFFTW in place.
Local use in School of Physics:
This package is installed on the local Linux system but to pickup the
native library you must set the environmental variable
LD_LIBRARY_PATH, so in bash speak, either type, or add to your
.bash_profile:
export LD_LIBRARY_PATH=/ifp/java/lib
This package has two levels of use, one using the DataArray classes which also handles the data, and the lower level FFTW classes which just takes raw FFTs, these are outlined below:
There is also a Package Document in PDF with extra FFT detail and the Class JavaDoc.If you are external, or want it on your own machine you can Download Package.
Plans and Efficiency
At the moment this package make a new plan for every FFT it takes so DOES NOT make best use of FFTW high level of optimisation. Its currently designed to make it as easy as possible to take FFT without having to worry about plans, wisdom etc. This is OK for people who want to take ``a few'' FFT, but not ideal for people wanting to take many FFT of the same size (for example for a real-time spectrum analyser). I am working on an updates FFTEngine interface that addresses this problem; more on this later.
Change Log
The package is still in fairly raw pre-release form, the recent changes are:
- 29-April-2008. Many updates, the main one are.
- Tidy up the constructors for Real/ComplexDataArray.
- Add new methods to FFTWReal and FFTWComplex to allow out-of-place transforms to re-defined output arrays. This should be more efficient, but my timing shows actually little improvement.
- Tidy up widsom methods to remove File use.
- Tidy up demo programmes with extensive comments and also add some proper commented demo programs on the use of FFTW interface.
- All code now with GPL licence included.
- Note: the underlying "C" code has not changed, so if you upgrade there is no need to recompile the sharable library.
- 22-May-2007 Lots of corrections to Java docs and comments but no functional code changes.
- 22-June-2007. Added multConjugate(DataArray d) method to
DataArray class.
Added mult and multConjugate static methods to ArrayUtil to deal with multiplications of complex arrays in split format.
Efficiency improvements (removing some setter/getters!!!) in some bits of RealDataArray and ComplexDataArray code.
Made c-code Makefile use java kit include files rather than gcc-java versions. Removes the need to have gcc-java installed to make the sharable library. - 15-July-1007. Released under GPL.
- 25-July-2007. Added two methods to ArrayUtil.
Big tidy-up of demo and test code with sensible comments added!
Minor chanages to Makefile, to set -fPIC option by default which increases the chance of easy install on non-Fedora systems.