Facemorph
Class Numerical

java.lang.Object
  extended by Facemorph.Numerical

public class Numerical
extends java.lang.Object

Some numberical methods


Field Summary
static float EPS
          A threshold value
static float FPMIN
          Floating point smallest value
static int ITMAX
          Maximum number of iterations
 
Constructor Summary
Numerical()
          Creates a new instance of Numerical
 
Method Summary
static float betai(float a, float b, float x)
          Incomplete beta function
static void FFT(float[] data, int[] nn, int ndim, int isign)
          Compute the ndim dimensional FFT
static float gammaq(float a, float x)
          Incomplete gamma function
static int twoFFT(float[] data1, float[] data2, int[] nn, int ndim, int isign)
          Replace two real arrays with their Fourier Transforms The complex left hand side of the transform is returned only the full transform can be recovered using symmetry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ITMAX

public static final int ITMAX
Maximum number of iterations

See Also:
Constant Field Values

EPS

public static final float EPS
A threshold value

See Also:
Constant Field Values

FPMIN

public static final float FPMIN
Floating point smallest value

See Also:
Constant Field Values
Constructor Detail

Numerical

public Numerical()
Creates a new instance of Numerical

Method Detail

gammaq

public static float gammaq(float a,
                           float x)
Incomplete gamma function

Parameters:
a - parameter a
x - parameter x
Returns:
return the evaluated function

betai

public static float betai(float a,
                          float b,
                          float x)
Incomplete beta function

Parameters:
a - a
b - b
x - x
Returns:
returns the incomplete beta function

FFT

public static void FFT(float[] data,
                       int[] nn,
                       int ndim,
                       int isign)
Compute the ndim dimensional FFT

Parameters:
data - data to FFT
nn - array holding the length of each dimension
ndim - number of dimensions
isign - isign=1 forward FFT, isign=-1 inverse FFT

twoFFT

public static int twoFFT(float[] data1,
                         float[] data2,
                         int[] nn,
                         int ndim,
                         int isign)
Replace two real arrays with their Fourier Transforms The complex left hand side of the transform is returned only the full transform can be recovered using symmetry

Parameters:
data1 - first data array
data2 - second data array
nn - dimensions
ndim - number of dimensions
isign -
Returns:
returns 1