|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jfftw.complex.Plan
Corresponds to an FFTW fftw_plan
(plan
for complex one dimensional transforms) structure.
A plan is a choice of algorithm to optimally compute
transforms
for a given size of data. Once you have a
Plan
you can use it to compute a number of
transforms for data of
the same size. Creating a plan
results in collection of much
information, that will be
reused at succeding creation of plans.
We represent a complex array of length N as a real
(double
) array of length 2*N, where the
(2*i)th element (of the real array) corresponds to the
real part of the ith element (of the complex array)
and the (2*i+1)th element (of the real array) corresponds
to the imaginary part of the ith element (of the complex
array).
For more information see the FFTW documentation. The FFTW library is work of MIT. The jfftw package is work of Daniel Darabos (cyhawk@sch.bme.hu). Both have GPL licenses.
Field Summary |
Fields inherited from interface jfftw.Plan |
BACKWARD, COMPLEX_TO_REAL, ESTIMATE, FORWARD, IN_PLACE, MEASURE, READONLY, REAL_TO_COMPLEX, USE_WISDOM |
Constructor Summary | |
Plan(int n)
Constructs a forward (see FORWARD )
Plan for the given length n based on
estimations (see ESTIMATE ). |
|
Plan(int n,
int dir)
Constructs a Plan for the given length
n and direction dir based
on
estimations (see ESTIMATE ). |
|
Plan(int n,
int dir,
int flags)
Constructs a Plan for the given length
n , direction dir and initialization
flags . |
|
Plan(int n,
int dir,
int flags,
double[] in,
int idist,
double[] out,
int odist)
Constructs a Plan for the given length
n , direction dir , initialization
flags
and actual input/output arrays. |
Method Summary | |
protected void |
finalize()
Destroys the fftwnd_plan structure. |
double[] |
transform(double[] in)
Calculates the Fourier transform of in . |
void |
transform(int howmany,
double[] in,
int istride,
int idist,
double[] out,
int ostride,
int odist)
Calculates multiple Fourier transforms. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Plan(int n, int dir, int flags, double[] in, int idist, double[] out, int odist)
Plan
for the given length
n
, direction dir
, initialization
flags
and actual input/output arrays.
The contents of the arrays are not used
(they can be
uninitialized) but will be destroyed.
(See FFTW documentation on
fftw_create_plan_specific
for
more insight.)
dir
- One of Plan.FORWARD
and Plan.BACKWARD
.flags
- One of Plan.ESTIMATE
(default) and Plan.MEASURE
optionally OR
'ed with Plan.USE_WISDOM
,
Plan.IN_PLACE
and Plan.READONLY
. Any other
flag constants from fftw.h
might be working, but
jfftw has not been tested with them.
java.lang.RuntimeException
- if the double type of Java is
not of the same
size as fftw_real
. (If this
is the case, the library will
need to be modified and
recompiled. If FFTW was compiled with
FFTW_ENABLE_FLOAT
all double types should
be changed to
float in the Java and native source -- or recompile FFTW without
FFTW_ENABLE_FLOAT
.)public Plan(int n, int dir, int flags)
Plan
for the given length
n
, direction dir
and initialization
flags
.
dir
- One of Plan.FORWARD
and Plan.BACKWARD
.flags
- One of Plan.ESTIMATE
(default) and Plan.MEASURE
optionally OR
'ed with Plan.USE_WISDOM
,
Plan.IN_PLACE
and Plan.READONLY
. Any other
flag constants from fftw.h
might be working, but
jfftw has not been tested with them.
java.lang.RuntimeException
- if the double type of Java is
not of the same
size as fftw_real
. (If this
is the case, the library will
need to be modified and
recompiled. If FFTW was compiled with
FFTW_ENABLE_FLOAT
all double types should
be changed to
float in the Java and native source -- or recompile FFTW without
FFTW_ENABLE_FLOAT
.)public Plan(int n, int dir)
Plan
for the given length
n
and direction dir
based
on
estimations (see ESTIMATE
). Same as
Plan( dim, dir, Plan.ESTIMATE )
.
dir
- One of Plan.FORWARD
and Plan.BACKWARD
.
java.lang.RuntimeException
- if the double type of Java is
not of the same
size as fftw_real
. (If this
is the case, the library will
need to be modified and
recompiled. If FFTW was compiled with
FFTW_ENABLE_FLOAT
all double types should
be changed to
float in the Java and native source -- or recompile FFTW without
FFTW_ENABLE_FLOAT
.)public Plan(int n)
FORWARD
)
Plan
for the given length n
based on
estimations (see ESTIMATE
). Same as
Plan( n, Plan.FORWARD, Plan.ESTIMATE )
.
java.lang.RuntimeException
- if the double type of Java is
not of the same
size as fftw_real
. (If this
is the case, the library will
need to be modified and
recompiled. If FFTW was compiled with
FFTW_ENABLE_FLOAT
all double types should
be changed to
float in the Java and native source -- or recompile FFTW without
FFTW_ENABLE_FLOAT
.)Method Detail |
protected void finalize()
fftwnd_plan
structure.
finalize
in class java.lang.Object
public double[] transform(double[] in)
in
.
(See FFTW documentation for details. The function
behind it is fftw_one
.)
transform
in interface Plan
java.lang.IndexOutOfBoundsException
- if in
is not double
the size that was passed to the constructor.public void transform(int howmany, double[] in, int istride, int idist, double[] out, int ostride, int odist)
(See FFTW documentation for details. The function
behind it is fftw
, the arguments are
mapped to
fftw
's arguments of the same name.)
transform
in interface Plan
java.lang.IndexOutOfBoundsException
- if in
or out
are not of the proper size.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |