net.grelf
Interface Fitter

All Known Implementing Classes:
Fitter_

public interface Fitter

Fits data to particular curves.


Method Summary
 double getC()
          Get the intercept of the fitted straight line, as in y = Mx + c
 double getChiSq()
          Get the chi-squared fitting factor.
 double getM()
          Get the slope of the fitted straight line, as in y = Mx + C
 double getQ()
          Get quality factor Q.
 double getSigmaC()
          Get the standard deviation of the intercept of the fitted line.
 double getSigmaM()
          Get the standard deviation of the slope of the fitted line.
 boolean isFitted()
           
 void leastSquaresStraightLine(double[] x, double[] y, double[] sigmaY)
          Fit a straight line y = Mx + C to the given data points by the least squares method.
 double x(double y)
          Calculate the inverse: x for given y, using the fitted parameters, x = (y - C) / M.
 double y(double x)
          Calculate y for given x, using the fitted parameters, y = Mx + C.
 

Method Detail

isFitted

boolean isFitted()

leastSquaresStraightLine

void leastSquaresStraightLine(double[] x,
                              double[] y,
                              double[] sigmaY)
Fit a straight line y = Mx + C to the given data points by the least squares method. The two arrays must be of the same length and that is the number of data points. After fitting the results are obtainable via the other methods of this class. The third parameter is a further array of the same length containing kown standard deviations of the measured values y, as weighting factors. If sigmaY is null all points are given equal weight.


getM

double getM()
Get the slope of the fitted straight line, as in y = Mx + C


getC

double getC()
Get the intercept of the fitted straight line, as in y = Mx + c


getSigmaM

double getSigmaM()
Get the standard deviation of the slope of the fitted line.


getSigmaC

double getSigmaC()
Get the standard deviation of the intercept of the fitted line.


getChiSq

double getChiSq()
Get the chi-squared fitting factor.


getQ

double getQ()
Get quality factor Q.


y

double y(double x)
Calculate y for given x, using the fitted parameters, y = Mx + C. Returns 0.0 if not fitted.


x

double x(double y)
Calculate the inverse: x for given y, using the fitted parameters, x = (y - C) / M. Returns 0.0 if not fitted.