datan

## Class MinEnclose

- java.lang.Object
- - datan.MinEnclose

-     public final class MinEnclose
      extends java.lang.Object

  A class trying to find an interval along a straight line in n-dimensional space which contains the minimum on that line of a function in n-space.
  Author:
    Siegmund Brandt.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MinEnclose(double a, double b, DatanVector x0, DatanVector xdir, int nstep, DatanUserFunction muf)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getSteps()`
    `double[]` | `getXValues()`
    `double[]` | `getYValues()`
    `boolean` | `hasConverged()`

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

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

- - ### Constructor Detail

    - #### MinEnclose

          public MinEnclose(double a,
                    double b,
                    DatanVector x0,
                    DatanVector xdir,
                    int nstep,
                    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.
        `muf` - user function which must be an extension of the abstract class DatanUserFunction.

  - ### Method Detail

    - #### getXValues

          public double[] getXValues()

      Returns:
        3 values (xa, xb, xc) of the variable a determining the interval containing the minimum.

    - #### getYValues

          public double[] getYValues()

      Returns:
        the function values (ya, yb, yc) of at the points given by (xa, xb, xc).

    - #### getSteps

          public int getSteps()

      Returns:
        the number of iteration steps needed, -1 if iteration failed.

    - #### hasConverged

          public boolean hasConverged()

      Returns:
        true if iteration successful, false otherwise.