datan

## Class MinDir

- java.lang.Object
- - datan.MinDir

-     public final class MinDir
      extends java.lang.Object

  A class determining the minimum of a function along a straight line in n-dimensional space. The minimum is first enclosed and then found according to combination the method of the golden section and of quadratic interpolation.
  Author:
    Siegmund Brandt.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MinDir(DatanVector x0, DatanVector xdir, int nstep, double epsilon, DatanUserFunction muf)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getMinimum()`
    `DatanVector` | `getMinPosition()`
    `boolean` | `hasConverged()`

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

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

- - ### Constructor Detail

    - #### MinDir

          public MinDir(DatanVector x0,
                DatanVector xdir,
                int nstep,
                double epsilon,
                DatanUserFunction muf)

      Parameters:
        `x0` - point in n-space
        `xdir` - direction in n-space. Straight line is given by x = x0 + a * xdir, where a is a running scalar variable.
        `nstep` - maximal step number; if a value <= 0 is used, then 1000 is taken instead.
        `epsilon` - accuracy; if a value <= 0. is used, then 1,E-8 is taken instead.
        `muf` - user function which must be an extension of the abstract class DatanUserFunction.

  - ### Method Detail

    - #### getMinPosition

          public DatanVector getMinPosition()

      Returns:
        the postion of the minimum.

    - #### getMinimum

          public double getMinimum()

      Returns:
        the function value at the minimum.

    - #### hasConverged

          public boolean hasConverged()

      Returns:
        true if iteration successful, false otherwise.