jvx.numeric

## Class PnConjugateGradient

- java.lang.Object
- - jvx.numeric.PnConjugateGradient

- All Implemented Interfaces:
    java.io.Serializable

      public class PnConjugateGradient
      extends java.lang.Object
      implements java.io.Serializable

  Minimize functionals using conjugate gradient method.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PnConjugateGradient()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `dfrprmn(PdVector p, double fTol, PnFunction func)` Perform several energy minimization steps using a conjugate gradient method.
    `int` | `getMaxNumIterations()` Get maximal number of allowed iterations in `dfrprmn`.
    `int` | `getNumIterations()` Get number of used iterations in last call of `dfrprmn`.
    `boolean` | `isStopped()` Get maximal number of allowed iterations in `dfrprmn`.
    `void` | `setMaxNumIterations(int num)` Set maximal number of allowed iterations in `dfrprmn`.
    `void` | `setStopped(boolean bStopped)` Set maximal number of allowed iterations in `dfrprmn`.

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

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

- - ### Constructor Detail

    - #### PnConjugateGradient

          public PnConjugateGradient()

  - ### Method Detail

    - #### getMaxNumIterations

          public int getMaxNumIterations()

      Get maximal number of allowed iterations in `dfrprmn`. If max number of iteration is reached then dfrprmn stops and returns.
      Since:
        JavaView 3.96.009

    - #### setMaxNumIterations

          public void setMaxNumIterations(int num)

      Set maximal number of allowed iterations in `dfrprmn`. If max number of iteration is reached then dfrprmn stops and returns.
      Since:
        JavaView 3.96.009

    - #### getNumIterations

          public int getNumIterations()

      Get number of used iterations in last call of `dfrprmn`. Return -1 if no iteration performed yet.

    - #### isStopped

          public boolean isStopped()

      Get maximal number of allowed iterations in `dfrprmn`. If max number of iteration is reached then dfrprmn stops and returns.
      Since:
        JavaView 3.96.009

    - #### setStopped

          public void setStopped(boolean bStopped)

      Set maximal number of allowed iterations in `dfrprmn`. If max number of iteration is reached then dfrprmn stops and returns.
      Since:
        JavaView 3.96.009

    - #### dfrprmn

          public double dfrprmn(PdVector p,
                       double fTol,
                       PnFunction func)

      Perform several energy minimization steps using a conjugate gradient method. The set of variables and the energy are given as parameters.

      Maximal number of steps is bounded by `getMaxNumIterations` which can be adjusted before calling this methods.

      If more iterations than `getMaxNumIterations` are needed until the stop criteria is reached then the method stops and returns with a warning. In this case the resulting vector does not represent a minima but the current state of the minimization process, and therefore can be used as initial value for another call of this method.

      Parameters:
        `p` - vector with variable data, will be changed.
        `fTol` - relative difference of energy used as stop criteria
        `func` - function to be minimized
      Returns:
        function value at minimum
      See Also:
        `setMaxNumIterations(int)`

"

The software JavaView? is copyright protected. All Rights Reserved.
"