Class Test_marquardt

  extended by numal.highprecision.test.Test_marquardt
All Implemented Interfaces:

public class Test_marquardt
extends Object
implements AP_marquardt_methods

Determine the parameters p[1], p[2], p[3] of the best fit of the function g(x[i],p)=p[1]+p[2]*exp(p[3]*x[i]) to data readings y[]={127.0, 151.0, 379.0, 421.0, 460.0, 426.0} where x[]={-5, -3, -1, 1, 3, 5}. The components of the residual vector are p[1]+p[2]*exp(p[3]*x[i])-y[i]. The elements of the Jacobian matrix are dg[i]/dp[1]=1, dg[i]/dp[2]=exp(p[3]*x[i]), dg[i]/dp[3]=p2[2]*x[i]*exp(p[3]*x[i]). For a successful test the main() method must output the following values : Parameters: 5.23225E2 -1.56839E2 -1.99778E-1 OUT: 7.22078E7 1.15716E2 1.72802E-3 1.65459E2 2.30000E1 2.20000E1 0.00000E0 Last residual vector: -29.6 86.6 -47.3 -26.2 -22.9 39.5

Constructor Summary
Method Summary
 boolean funct(int m, int n, double[] par, double[] rv)
 void jacobian(int m, int n, double[] par, double[] rv, double[][] jac)
static void main(String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Test_marquardt()
Method Detail


public static void main(String[] args)


public boolean funct(int m,
                     int n,
                     double[] par,
                     double[] rv)
Specified by:
funct in interface AP_marquardt_methods


public void jacobian(int m,
                     int n,
                     double[] par,
                     double[] rv,
                     double[][] jac)
Specified by:
jacobian in interface AP_marquardt_methods