Package cnuphys.splot.fit
Class ErfFit
java.lang.Object
com.nr.model.Fitmrq
cnuphys.splot.fit.ErfFit
- All Implemented Interfaces:
IValueGetter
For fitting a single error function to a curve (DataColumn)
- Author:
- heddle
-
Field Summary
Fields inherited from class com.nr.model.Fitmrq
a, alpha, chisq, covar, ia -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleGet the chi square of the fitdouble[][]Get the covariance matrixdouble[]Get the fit parametersstatic double[]initialGuess(Fit fit) A method to generate an initial guessdoublevalue(double x) Methods inherited from class com.nr.model.Fitmrq
covsrt, fit, free, hold, mrqcof
-
Constructor Details
-
ErfFit
Create a Error function Fit and perform the fit- Parameters:
fit- the fit datatolerance- the tolerance- Throws:
IllegalArgumentException
-
-
Method Details
-
initialGuess
A method to generate an initial guess- Parameters:
fit- the fit data- Returns:
- initial guess
-
getFitParameters
public double[] getFitParameters()Get the fit parameters- Returns:
- the fit parameters
-
getCovarianceMatrix
public double[][] getCovarianceMatrix()Get the covariance matrix- Returns:
- the covariance matrix
-
getChiSquare
public double getChiSquare()Get the chi square of the fit- Returns:
- the chi square
-
value
public double value(double x) - Specified by:
valuein interfaceIValueGetter
-