datan

## Class LsqNon

- java.lang.Object
- - datan.LsqNon

-     public final class LsqNon
      extends java.lang.Object

  A class performing the least-squares fit of a nonlinear function to a set of data, using an iterative procedure with step-size reduction.
  Author:
    Siegmund Brandt.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LsqNon(DatanVector t, DatanVector y, DatanVector deltay, DatanVector x, int[] list, DatanUserFunction luf)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getChiSquare()`
    `DatanMatrix` | `getCovarianceMatrix()`
    `DatanVector` | `getResult()`
    `boolean` | `hasConverged()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LsqNon

          public LsqNon(DatanVector t,
                DatanVector y,
                DatanVector deltay,
                DatanVector x,
                int[] list,
                DatanUserFunction luf)

      Parameters:
        `t` - vector, the elements of which are the controlled variables t_i
        `y` - vector of the corresponding measured values.
        `deltay` - vector of measurement errors.
        `x` - vector of first approximations of unknowns.
        `list` - array containing the elements of a list specifying which of the n variables are fixed (list element = 0) and which are adjustable (list element = 1).
        `luf` - user function which must be an extension of the abstract class DatanUserFunction.

  - ### Method Detail

    - #### getResult

          public DatanVector getResult()

      Returns:
        the vector of unknowns.

    - #### getCovarianceMatrix

          public DatanMatrix getCovarianceMatrix()

      Returns:
        the covariance matrix ot the unknowns.

    - #### getChiSquare

          public double getChiSquare()

      Returns:
        the value of the minimum function.

    - #### hasConverged

          public boolean hasConverged()

      Returns:
        true if iteration successful, false otherwise.