jphase.fit
Class FitterUtils

java.lang.Object
  extended by jphase.fit.FitterUtils

public class FitterUtils
extends java.lang.Object

This class contains a set of methods to make some usual calculations for the PhaseFitter classes

Author:
Juan Fernando Pérez

Constructor Summary
FitterUtils()
           
 
Method Summary
static double ceil(double x, double epsilon)
          Calculates the ceil of a double with a predefined precision
static double factMomentK(int[] data, int k)
          Calculates the k-th factorial moment of the data trace
static double floor(double x, double epsilon)
          Calculates the floor of a double with a predefined precision
static double powerMomentK(double[] data, int k)
          Calculates the k-th power moment of the data trace
static double sqrt(double x, double epsilon)
          Calculates the square root of a double with a predefined precision
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FitterUtils

public FitterUtils()
Method Detail

powerMomentK

public static double powerMomentK(double[] data,
                                  int k)
Calculates the k-th power moment of the data trace

Parameters:
data - data trace
k - power moment to be calculated (>= 1)
Returns:
Data k-th power Moment

factMomentK

public static double factMomentK(int[] data,
                                 int k)
Calculates the k-th factorial moment of the data trace

Parameters:
data - data trace
k - factorial moment to be calculated (>= 1)
Returns:
Data k-th factorial Moment

floor

public static double floor(double x,
                           double epsilon)
Calculates the floor of a double with a predefined precision

Parameters:
x -
epsilon - precision
Returns:
The floor of a double with the predefined precision

ceil

public static double ceil(double x,
                          double epsilon)
Calculates the ceil of a double with a predefined precision

Parameters:
x -
epsilon - precision
Returns:
The ceil of a double with the predefined precision

sqrt

public static double sqrt(double x,
                          double epsilon)
Calculates the square root of a double with a predefined precision

Parameters:
x -
epsilon - precision
Returns:
The square root of a double with the predefined precision