etomica.util.numerical

## Class NonLinearCurveFitting

• java.lang.Object
• etomica.util.numerical.NonLinearCurveFitting

• ```public class NonLinearCurveFitting
extends java.lang.Object```
Class that compute Reference: NUMERICAL RECIPES in Fortran 2nd Ed. Levenberg-Marquardt Method (Chapter 15) - combination of the use of (a) Inverse-Hessian Method [Eq. 15.5.9] (b) Steepest Descent Method [Eq. 15.5.10] Adapting codes from subroutines: mrqmin, covsrt, and mrqcof The program: - Takes in user-defined function FittingFunctionNonLinear where the func and derivative are defined - Calculates for beta[] and alpha[][] as defined in [Eq 15.5.8 through 15.5.11] - Solves for da [Eq 15.5.14] - Return parameters, a[] Note: Eqs. are from Reference
• ### Field Summary

Fields
Modifier and Type Field and Description
`protected double[]` `a`
`protected double` `alamda`
`protected double[][]` `alpha`
`protected double[]` `atry`
`protected double[]` `beta`
`protected double` `chisq`
`protected double[][]` `covar`
`protected double[]` `da`
`protected FittingFunctionNonLinear` `funcs`
`protected boolean` `iterate`
`protected int` `ma`
`protected int` `ndata`
`protected double` `ochisq`
`protected double[]` `sig`
`protected double[]` `x`
`protected double[]` `y`
• ### Constructor Summary

Constructors
Constructor and Description
```NonLinearCurveFitting(java.lang.String filename, int M, int N)```
• ### Method Summary

All Methods
Modifier and Type Method and Description
`double` `computeRMSD(double[] a)`
`double[]` `findParameter()`
`static void` `main(java.lang.String[] args)`
`void` `mrqcof(double[] atry)`
`void` `mrqcofA(double[] a)`
`void` `mrqmin()`
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Field Detail

• #### funcs

`protected FittingFunctionNonLinear funcs`
• #### ma

`protected int ma`
• #### ndata

`protected int ndata`
• #### a

`protected double[] a`
• #### beta

`protected double[] beta`
• #### sig

`protected double[] sig`
• #### x

`protected double[] x`
• #### y

`protected double[] y`
• #### covar

`protected double[][] covar`
• #### alpha

`protected double[][] alpha`
• #### iterate

`protected boolean iterate`
• #### chisq

`protected double chisq`
• #### ochisq

`protected double ochisq`
• #### alamda

`protected double alamda`
• #### atry

`protected double[] atry`
• #### da

`protected double[] da`
• ### Constructor Detail

• #### NonLinearCurveFitting

```public NonLinearCurveFitting(java.lang.String filename,
int M,
int N)```
• ### Method Detail

• #### findParameter

`public double[] findParameter()`
• #### mrqmin

`public void mrqmin()`
• #### mrqcof

`public void mrqcof(double[] atry)`
• #### mrqcofA

`public void mrqcofA(double[] a)`
• #### computeRMSD

`public double computeRMSD(double[] a)`
• #### main

`public static void main(java.lang.String[] args)`