jphase.fit

## Class FitterUtils

- java.lang.Object
- - jphase.fit.FitterUtils

-     public class FitterUtils
      extends java.lang.Object

  This class contains a set of methods for common computations in the PhaseFitter classes
  Version:
    1.0
  Author:
    Juan F. Pérez

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FitterUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static double` | `ceil(double x, double epsilon)` Computes the ceiling of a double with a predefined precision
    `static double` | `factMomentK(int[] data, int k)` Computes the k-th factorial moment of the data trace
    `static double` | `floor(double x, double epsilon)` Computes the floor of a double with a predefined precision
    `static double` | `powerMomentK(double[] data, int k)` Computes the k-th power moment of the data trace
    `static double` | `sqrt(double x, double epsilon)` Computes the square root of a double with a predefined precision

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FitterUtils

          public FitterUtils()

  - ### Method Detail

    - #### powerMomentK

          public static double powerMomentK(double[] data,
                            int k)

      Computes 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)

      Computes 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)

      Computes 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)

      Computes the ceiling of a double with a predefined precision
      Parameters:
        `x` -
        `epsilon` - precision
      Returns:
        The ceiling of a double with the predefined precision

    - #### sqrt

          public static double sqrt(double x,
                    double epsilon)

      Computes 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