Exemplo n.º 1
0
 /**
  * Initiates the fit with function constructed weights and a JAMA matrix. N is the number of
  * y-data points, K is the dimension of the fit function and M is the number of fit parameters.
  * Call <code>this.fit()</code> to start the actual fitting.
  *
  * @param function The model function to be fitted. Input parameter sizes K and M.
  * @param parameters The initial guess for the fit parameters, length M.
  * @param yDataPoints The y-data points in an array.
  * @param xDataPoints The x-data points for each y data point, double[y-index][x-index]
  */
 public LMA(
     LMAMultiDimFunction function,
     double[] parameters,
     double[] yDataPoints,
     double[][] xDataPoints) {
   this(
       function,
       parameters,
       yDataPoints,
       xDataPoints,
       function.constructWeights(
           ArrayConverter.combineMultiDimDataPoints(yDataPoints, xDataPoints)),
       new JAMAMatrix(parameters.length, parameters.length));
 }