MaxIter (Apache Commons Math 3.3 API)

org.apache.commons.math3.optim

## Class MaxIter

- java.lang.Object
- - org.apache.commons.math3.optim.MaxIter

- All Implemented Interfaces:
    OptimizationData

      public class MaxIter
      extends Object
      implements OptimizationData

  Maximum number of iterations performed by an (iterative) algorithm.
  Since:
    3.1
  Version:
    $Id: MaxIter.java 1435539 2013-01-19 13:27:24Z tn $

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MaxIter(int max)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getMaxIter()` Gets the maximum number of evaluations.
    `static MaxIter` | `unlimited()` Factory method that creates instance of this class that represents a virtually unlimited number of iterations.

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

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

- - ### Constructor Detail

    - #### MaxIter

          public MaxIter(int max)

      Parameters:
        `max` - Allowed number of iterations.
      Throws:
        `NotStrictlyPositiveException` - if `max <= 0`.

  - ### Method Detail

    - #### getMaxIter

          public int getMaxIter()

      Gets the maximum number of evaluations.
      Returns:
        the allowed number of evaluations.

    - #### unlimited

          public static MaxIter unlimited()

      Factory method that creates instance of this class that represents a virtually unlimited number of iterations.
      Returns:
        a new instance suitable for allowing `Integer.MAX_VALUE` evaluations.

Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.