|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jfftw.FFTW
public class FFTW
Basic class for Java access to the fftw3
library to take Fourier Transforms or one-dimensional,
two-dimensional or three-dimensional data held
in double[]
arrays.
This class set package defaults, manages the wisdom information
and loads the sharable library. Actual numerical use of this package
is via the extending classes FFTWReal
and
FFTWComplex
Note this class is not declared abstract
since
direct instances of this class can be used to manipulate
the static library parameters.
If you are a novice used, dont start here, look at the
DataArray
, at its exteding classes. These allow you
to take simple FFTs without understanding the complicated bits!
Field Summary | |
---|---|
static int |
BACKWARD
Flag for backward (on inverse) FFT |
protected static PrintStream |
errorStream
PrintStream for warning and error messages. |
static int |
ESTIMATE
Flag for quick and dirty plan search (fast, but not optimal) |
static int |
EXHAUSTIVE
Flag for exhaustive plan search (very slow) |
static int |
FORWARD
Flag for forward FFT |
static int |
FOURIER
Flag for Fourier space |
static boolean |
loaded
Boolean to determine in the sharable library has been loaded successfully. |
static int |
PATIENT
Flag for patient plan search (medium slow) |
protected int |
planFlag
Integer to set to the current plan in use by the package. |
static int |
REAL
Flag for Real space |
static boolean |
throwLoadException
Public static boolen to determine if an excepction in thrown if the native library is missing. |
static String |
version
Version flag |
Constructor Summary | |
---|---|
FFTW()
Default constructor, do nothing but load the sharable library. |
|
FFTW(boolean systemWisdom)
Constructor with flag to optionally load the system wisdom file. |
|
FFTW(FFTW fft)
Constructor to form a new FFTW, being a copy of the specified one. |
|
FFTW(String wisdomFileName)
Constructor to load specified wisdom file specified by name. |
Method Summary | |
---|---|
void |
addPlanFlag(int addition)
Method to add to the plan flag |
void |
clearWisdom()
Void method to clear the wisdom information |
boolean |
exportWisdom(String fileName)
Boolean method to export the current wisdom to a file. |
int |
getPlanFlag()
Method to get the plan flag |
String |
getVersion()
Method to get the version string |
String |
getWisdom()
Method to get the wisdom information as a String |
boolean |
loadWisdom()
Boolean method to load system wisdom file |
boolean |
loadWisdom(String fileName)
Boolean method to load wisdom file from specified file by name. |
boolean |
loadWisdomFromString(String wisdom)
Boolean method to load the wisdom froma local Java |
static String |
readWisdom(BufferedReader in)
Static method to read a Wisdom file into a String from a BufferedReader |
static String |
readWisdom(File file)
Static method to read a Wisdom file into a String from a File |
void |
setErrorStream(PrintStream es)
Method to reset the default errorStream for package. |
void |
setPlanFlag(int flag)
Method to set the plan flag, default is ESTIMATE |
void |
setSystemWisdom(String fileName)
Method to reset the system wisdom file location. |
static boolean |
writeWisdom(String wisdom,
File file)
Static method to write wisdom String to a file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String version
public static final int REAL
public static final int FOURIER
public static final int FORWARD
public static final int BACKWARD
public static final int EXHAUSTIVE
public static final int PATIENT
public static final int ESTIMATE
Note: this is default for jttfw but NOT the normal FFTW default
protected static PrintStream errorStream
System.err
.
protected int planFlag
public static boolean throwLoadException
false
will allow the Java code to run but not any of the native
library calls. Use this feature ONLY if you really
understand what you are doing!
public static boolean loaded
Constructor Detail |
---|
public FFTW()
public FFTW(FFTW fft)
fft
- the FFTWpublic FFTW(boolean systemWisdom)
systemWisdom
- if true default system wisdom filepublic FFTW(String wisdomFileName)
wisdomFileName
- the name of the wisdom fileMethod Detail |
---|
public String getVersion()
String
public void setPlanFlag(int flag)
Since most jfftw call involve a one-off use of plans setting this of other options should be done with extreme care and understing of the implications.
flag
- the plan flagpublic void addPlanFlag(int addition)
addition
- the addition to addpublic int getPlanFlag()
public void setErrorStream(PrintStream es)
es
- the error PrintStreampublic void setSystemWisdom(String fileName)
fileName
- name of default wisdom filepublic boolean loadWisdom()
public boolean loadWisdom(String fileName)
fileName
- the wisdom file name
public boolean loadWisdomFromString(String wisdom)
public void clearWisdom()
public boolean exportWisdom(String fileName)
fileName
- the output file name in a String.
boolean
true if successful, else falsepublic String getWisdom()
String
returns the FFTW wisdom
entry in a formatted String.public static String readWisdom(BufferedReader in)
BufferedReader
in
- the input reader.
public static String readWisdom(File file)
File
file
- the wisdom file
public static boolean writeWisdom(String wisdom, File file)
wisdom
- the wisdom Stringfile
- the output file
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |